Skip to content

Commit

Permalink
Merge pull request #67 from nwesterhausen/66-support-for-arm64
Browse files Browse the repository at this point in the history
build: update container build action to include more platforms
  • Loading branch information
nwesterhausen authored Apr 13, 2024
2 parents 279a59e + 7b4a4bb commit b97842e
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,33 @@ jobs:
#
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
# setup up QEMU and Docker Buildx
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to the GitHub Container registry
uses: docker/login-action@5f4866a30a54f16a52d2ecb4a3898e9e424939cf
with:
registry: ${{ env.REGISTRY }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@c314eea2b27e3cb3c7d7be0618510234d8f6178e
uses: docker/metadata-action@c314eea2b27e3cb3c7d7be0618510234d8f6178e # v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: |
${{ env.IMAGE_NAME }}
ghcr.io/${{ env.IMAGE_NAME }}
tags: |
type=schedule
type=semver,pattern={{version}}
Expand All @@ -53,9 +66,10 @@ jobs:
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@f8bc7f46003ef0cf98b715743d86c2f1ccd01436
uses: docker/build-push-action@f8bc7f46003ef0cf98b715743d86c2f1ccd01436 # v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/arm/v7

0 comments on commit b97842e

Please sign in to comment.