Skip to content

Commit 3c32e1b

Browse files
authored
Update docker_crossbuild_publish.yml
1 parent 2e2e4e6 commit 3c32e1b

File tree

1 file changed

+32
-9
lines changed

1 file changed

+32
-9
lines changed

.github/workflows/docker_crossbuild_publish.yml

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Cross-Compile Docker Build and Push
33
on:
44
release:
55
types: [published]
6+
push:
7+
branches:
8+
- fix-docker-GA
69
workflow_dispatch:
710

811
env:
@@ -26,6 +29,11 @@ jobs:
2629
- name: Set up Docker Buildx
2730
uses: docker/setup-buildx-action@v3
2831

32+
- name: Prepare
33+
run: |
34+
platform=${{ matrix.platform }}
35+
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
36+
2937
- name: Generate Docker metadata
3038
id: metadata
3139
uses: docker/metadata-action@v5
@@ -51,20 +59,25 @@ jobs:
5159
build-args: |
5260
TARGETPLATFORM=${{ matrix.platform }}
5361
CCARCH=${{ matrix.ccarch }}
54-
62+
5563
- name: Export digest
5664
run: |
57-
mkdir -p /tmp/digests
65+
mkdir -p ${{ runner.temp }}/digests
5866
digest="${{ steps.build.outputs.digest }}"
59-
touch "/tmp/digests/${digest#sha256:}"
67+
touch "${{ runner.temp }}/digests/${digest#sha256:}"
68+
# - name: Export digest
69+
# run: |
70+
# mkdir -p /tmp/digests
71+
# digest="${{ steps.build.outputs.digest }}"
72+
# touch "/tmp/digests/${digest#sha256:}"
6073

6174
- name: Upload digest
6275
uses: actions/upload-artifact@v4
6376
with:
64-
name: digests
65-
path: /tmp/digests/*
66-
if-no-files-found: error
67-
retention-days: 1
77+
name: digests-${{ env.PLATFORM_PAIR }}
78+
path: ${{ runner.temp }}/digests/*
79+
if-no-files-found: error
80+
retention-days: 1
6881

6982
merge:
7083
needs: build
@@ -95,10 +108,20 @@ jobs:
95108
password: ${{ secrets.GITHUB_TOKEN }}
96109

97110
- name: Create manifest list and push
98-
working-directory: /tmp/digests
111+
working-directory: ${{ runner.temp }}/digests
99112
run: |
100113
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
101114
$(printf 'ghcr.io/zargarzadehm/oracle-core@sha256:%s ' *)
115+
102116
- name: Inspect image
103117
run: |
104-
docker buildx imagetools inspect ghcr.io/zargarzadehm/oracle-core:${{ steps.metadata.outputs.version }}
118+
docker buildx imagetools inspect ghcr.io/zargarzadehm/oracle-core:${{ steps.meta.outputs.version }}
119+
120+
# - name: Create manifest list and push
121+
# working-directory: /tmp/digests
122+
# run: |
123+
# docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
124+
# $(printf 'ghcr.io/zargarzadehm/oracle-core@sha256:%s ' *)
125+
# - name: Inspect image
126+
# run: |
127+
# docker buildx imagetools inspect ghcr.io/zargarzadehm/oracle-core:${{ steps.metadata.outputs.version }}

0 commit comments

Comments
 (0)