Skip to content

Commit

Permalink
Merge pull request #740 from onekey-sec/fix-docker-build
Browse files Browse the repository at this point in the history
Fix docker build
  • Loading branch information
qkaiser authored Jan 30, 2024
2 parents 7b9f9a6 + 613d5c5 commit 63fa9d1
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/build-publish-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
- linux/amd64
- linux/arm64
steps:
- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Checkout source code
uses: actions/checkout@v4

Expand All @@ -39,6 +44,7 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand Down Expand Up @@ -94,7 +100,7 @@ jobs:
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-digests
name: digest-${{ env.PLATFORM_PAIR }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
Expand All @@ -107,21 +113,30 @@ jobs:
- name: Download digests
uses: actions/download-artifact@v4
with:
name: digests
path: /tmp/digests
pattern: digest-*
merge-multiple: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_IMAGE }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=sha
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Create manifest list and push
working-directory: /tmp/digests
run: |
Expand Down

0 comments on commit 63fa9d1

Please sign in to comment.