This commit is contained in:
nora 2022-08-12 14:52:58 +02:00
parent bf5e6acf46
commit bb5fddcfa6
2 changed files with 9 additions and 5 deletions

View file

@ -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

View file

@ -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}`)
});