@@ -9,17 +9,17 @@ local runnersMap = {
99};
1010
1111local setupSteps = function (region) [
12- { uses: 'docker/setup-buildx-action@v2 ' },
12+ { uses: 'docker/setup-buildx-action@v3 ' },
1313 {
14- uses: 'aws-actions/configure-aws-credentials@v1 ' ,
14+ uses: 'aws-actions/configure-aws-credentials@v4 ' ,
1515 with: {
1616 'aws-region' : region,
1717 'role-to-assume' : 'arn:aws:iam::005216166247:role/GhaDockerPush' ,
1818 'role-skip-session-tagging' : true ,
1919 },
2020 },
2121 {
22- uses: 'aws-actions/amazon-ecr-login@v1 ' ,
22+ uses: 'aws-actions/amazon-ecr-login@v2 ' ,
2323 id: 'login-ecr' ,
2424 },
2525];
@@ -37,7 +37,6 @@ function(name, region='ap-northeast-1', platforms=['linux/arm64']) {
3737 },
3838 jobs: {
3939 build: {
40- name: 'build' ,
4140 strategy: {
4241 matrix: {
4342 include: std.map (function (platform) {
@@ -47,11 +46,12 @@ function(name, region='ap-northeast-1', platforms=['linux/arm64']) {
4746 }, platforms),
4847 },
4948 },
49+ name: 'build (${{ matrix.platform }})' ,
5050 'runs-on' : '${{ matrix.runner }}' ,
5151 permissions: { 'id-token' : 'write' , contents: 'read' },
5252 steps: setupSteps(region) + [
5353 {
54- uses: 'docker/build-push-action@v3 ' ,
54+ uses: 'docker/build-push-action@v6 ' ,
5555 id: 'build-push' ,
5656 with: {
5757 context: std.format ('{{defaultContext}}:%s' , name),
@@ -60,7 +60,7 @@ function(name, region='ap-northeast-1', platforms=['linux/arm64']) {
6060 },
6161 },
6262 {
63- name: 'Export digest ' ,
63+ name: 'Export digests ' ,
6464 run: |||
6565 mkdir -p "${RUNNER_TEMP}/digests"
6666 printenv DIGEST > "${RUNNER_TEMP}/digests/${PLATFORM}"
@@ -72,6 +72,7 @@ function(name, region='ap-northeast-1', platforms=['linux/arm64']) {
7272 },
7373 },
7474 {
75+ name: 'Upload digests' ,
7576 uses: 'actions/upload-artifact@v4' ,
7677 with: {
7778 name: 'digests-${{ matrix.key }}' ,
@@ -88,6 +89,7 @@ function(name, region='ap-northeast-1', platforms=['linux/arm64']) {
8889 permissions: { 'id-token' : 'write' },
8990 steps: setupSteps(region) + [
9091 {
92+ name: 'Download digests' ,
9193 uses: 'actions/download-artifact@v4' ,
9294 with: {
9395 path: '${{ runner.temp }}/digests' ,
@@ -98,10 +100,11 @@ function(name, region='ap-northeast-1', platforms=['linux/arm64']) {
98100 {
99101 name: 'Push manifest' ,
100102 run: |||
101- cat * | xargs -I{} printf "%s@%s" "${REPO}" {} | docker buildx imagetools create -f /dev/stdin -t "${REPO}:latest" -t "${REPO}:${SHA}"
103+ cat "${RUNNER_TEMP}"/digests/ * | xargs -I{} printf "%s@%s" "${REPO}" {} | docker buildx imagetools create -f /dev/stdin -t "${REPO}:latest" -t "${REPO}:${SHA}"
102104 docker buildx imagetools inspect "${REPO}:${SHA}"
103105 ||| ,
104106 env: {
107+ RUNNER_TEMP: '${{ runner.temp }}' ,
105108 REPO: std.format ('${{ steps.login-ecr.outputs.registry }}/%s' , name),
106109 SHA: '${{ github.sha }}' ,
107110 },
0 commit comments