Skip to content

Commit

Permalink
Added support for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhirn authored and jgosmann committed Feb 17, 2024
1 parent 046fe14 commit faf00e8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ on:
required: true

env:
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: jgosmann/dmarc-metrics-exporter


jobs:
Expand All @@ -42,12 +41,18 @@ jobs:
run: REF=${{ inputs.version }}; TAG=${REF#refs/*/}; echo "version=${TAG#v}" >> $GITHUB_OUTPUT

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

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

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

# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -56,17 +61,18 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: jgosmann/dmarc-metrics-exporter:${{ steps.version.outputs.version }}
tags: ${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }}
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
build-args: "version=${{ steps.version.outputs.version }}"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim AS builder
FROM --platform=linux/amd64 python:3.11-slim AS builder
ARG version

# install python package in venv
Expand Down

0 comments on commit faf00e8

Please sign in to comment.