Skip to content

Commit 16094d9

Browse files
Update dist dir and add check (#367)
1 parent 1ce0cf7 commit 16094d9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/pr.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,9 @@ jobs:
2020

2121
- name: Run unit tests
2222
run: npm run test
23+
24+
- name: Check dist is up-to-date
25+
run: |
26+
npm run build
27+
git add dist/
28+
git diff --staged --exit-code || (echo "❌ dist/ is not up-to-date. Please run 'npm run build' and commit the changes." && exit 1)

dist/index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31579,8 +31579,14 @@ const push = (imageName, tags, buildOpts) => {
3157931579
return;
3158031580
}
3158131581

31582-
core.info(`Pushing tags ${tags} for Docker image ${imageName}...`);
31583-
cp.execSync(`docker push ${imageName} --all-tags`, cpOptions);
31582+
// Ensure tags is an array
31583+
const tagArray = Array.isArray(tags) ? tags : [tags];
31584+
core.info(`Pushing individual tags ${tagArray} for Docker image ${imageName}...`);
31585+
31586+
tagArray.forEach(tag => {
31587+
core.info(`Pushing tag: ${tag}`);
31588+
cp.execSync(`docker push ${imageName}:${tag}`, cpOptions);
31589+
});
3158431590
};
3158531591

3158631592
module.exports = {

0 commit comments

Comments
 (0)