mirror of
https://github.com/Noratrieb/actions-playground.git
synced 2026-01-16 09:55:04 +01:00
magic!
This commit is contained in:
parent
bf5e6acf46
commit
bb5fddcfa6
2 changed files with 9 additions and 5 deletions
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
|
@ -9,8 +9,8 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
install-build:
|
install-build:
|
||||||
outputs:
|
outputs:
|
||||||
foo-service: 'run'
|
foo-service: ${{ steps.install.outputs.foo-service }}
|
||||||
bar-service: 'skip'
|
bar-service: ${{ steps.install.outputs.bar-service }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: install
|
- name: install
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,14 @@ const serviceVersions = {};
|
||||||
const currentCommit = latestCommitInDirectory('.');
|
const currentCommit = latestCommitInDirectory('.');
|
||||||
|
|
||||||
for (const service of services) {
|
for (const service of services) {
|
||||||
const version = latestCommitInDirectory(service);
|
serviceVersions[service] = latestCommitInDirectory(service);
|
||||||
|
|
||||||
serviceVersions[service] = version;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(currentCommit);
|
console.log(currentCommit);
|
||||||
console.log(serviceVersions);
|
console.log(serviceVersions);
|
||||||
|
|
||||||
|
Object.entries(serviceVersions).forEach(([name, version]) => {
|
||||||
|
const skip = version === currentCommit ? 'run' : 'skip';
|
||||||
|
|
||||||
|
console.log(`::set-output name=${name}::${skip}`)
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue