Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Commit

Permalink
feat: arm64 docker images (#76)
Browse files Browse the repository at this point in the history
Co-authored-by: Rene Veenhuis <re.veenhuis@gmail.com>
  • Loading branch information
sibalzer and pixiono committed Jun 14, 2021
1 parent f70f9cc commit 23bc387
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 22 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/nightly.yaml
Expand Up @@ -5,11 +5,20 @@ on:
workflow_dispatch: {}
jobs:
build-release:
name: Build and release Docker image
name: Build, tag, and release Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set SHA
run: echo "GITHUB_SHA=${GITHUB_SHA:0:7}" >> $GITHUB_ENV

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

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

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand All @@ -18,13 +27,12 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
run: |
docker build \
-f docker/Dockerfile \
-t "ghcr.io/${GITHUB_REPOSITORY}:${GITHUB_SHA:0:7}" \
-t "ghcr.io/${GITHUB_REPOSITORY}:nightly" .
- name: Release Docker images to ghcr.io
run: |
docker push "ghcr.io/${GITHUB_REPOSITORY}:${GITHUB_SHA:0:7}"
docker push "ghcr.io/${GITHUB_REPOSITORY}:nightly"
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository }}:nightly
ghcr.io/${{ github.repository }}:${{ env.GITHUB_SHA }}
26 changes: 15 additions & 11 deletions .github/workflows/release.yaml
Expand Up @@ -21,6 +21,12 @@ jobs:
changelog-path: CHANGELOG.md
package-name: impfbot

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

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

- name: Login to GitHub Container Registry
if: ${{ steps.release.outputs.release_created }}
uses: docker/login-action@v1
Expand All @@ -31,14 +37,12 @@ jobs:

- name: Build Docker image
if: ${{ steps.release.outputs.release_created }}
run: |
docker build \
-f docker/Dockerfile \
-t "ghcr.io/${GITHUB_REPOSITORY}:${{ steps.release.outputs.tag_name }}" \
-t "ghcr.io/${GITHUB_REPOSITORY}:latest" .
- name: Release Docker image to ghcr.io
if: ${{ steps.release.outputs.release_created }}
run: |
docker push "ghcr.io/${GITHUB_REPOSITORY}:${{ steps.release.outputs.tag_name }}"
docker push "ghcr.io/${GITHUB_REPOSITORY}:latest"
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ steps.release.outputs.tag_name }}

0 comments on commit 23bc387

Please sign in to comment.