mirror of
https://github.com/Noratrieb/actions-playground.git
synced 2026-01-14 17:05:05 +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:
|
||||
install-build:
|
||||
outputs:
|
||||
foo-service: 'run'
|
||||
bar-service: 'skip'
|
||||
foo-service: ${{ steps.install.outputs.foo-service }}
|
||||
bar-service: ${{ steps.install.outputs.bar-service }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: install
|
||||
|
|
|
|||
|
|
@ -11,10 +11,14 @@ const serviceVersions = {};
|
|||
const currentCommit = latestCommitInDirectory('.');
|
||||
|
||||
for (const service of services) {
|
||||
const version = latestCommitInDirectory(service);
|
||||
|
||||
serviceVersions[service] = version;
|
||||
serviceVersions[service] = latestCommitInDirectory(service);
|
||||
}
|
||||
|
||||
console.log(currentCommit);
|
||||
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