mirror of
https://github.com/Noratrieb/actions-playground.git
synced 2026-01-14 17:05:05 +01:00
it's fine
This commit is contained in:
parent
51fd402877
commit
1325349985
1 changed files with 1 additions and 1 deletions
|
|
@ -1,24 +0,0 @@
|
|||
import * as child_process from 'child_process';
|
||||
|
||||
const services = ['bar-service', 'foo-service'];
|
||||
|
||||
function latestCommitInDirectory(dirname) {
|
||||
return String(child_process.execSync(`git log --pretty=format:%H -n 1 -- ${dirname}`));
|
||||
}
|
||||
|
||||
const serviceVersions = {};
|
||||
|
||||
const currentCommit = latestCommitInDirectory('.');
|
||||
|
||||
for (const service of services) {
|
||||
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