Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
identw committed Feb 26, 2024
1 parent 076551c commit 6fd6876
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-main-action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- main
- image-operation
paths:
- js-action/src/**/*
- js-action/package*.json
Expand Down
8 changes: 8 additions & 0 deletions js-action/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ async function main() {

let prePushImages = [];
for (const image of buildOpts) {
if (!image.hasOwnProperty('operation')) {
image['operation'] = 'build-and-push';
}
console.log(`${image.name} operation ${image.operation}`);
if (image.operation !== 'push' && image.operation !== 'build-and-push') {
continue;
}

const imageTag = `${registry}/${repoName}/${image.name}:${tag}`;
const prePushTag = `0000001-${generateRandomString(8)}`;
const imagePrePushTag = `${registry}/${repoName}/${image.name}:${prePushTag}`;
Expand Down

0 comments on commit 6fd6876

Please sign in to comment.