Skip to content

Commit

Permalink
feat: add arm platform support
Browse files Browse the repository at this point in the history
Closes #207
  • Loading branch information
jessebye committed Jun 15, 2024
1 parent 3c2d09a commit ac1b7f3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ jobs:
env:
SEMANTIC_OUTPUTS: ${{ toJson(steps.semantic-dry-run.outputs) }}

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

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

- name: docker login
run: |
echo "$GCR_TOKEN" | docker login ghcr.io -u codfish --password-stdin
Expand All @@ -62,9 +70,12 @@ jobs:

# Dockerhub is auto synced with the repo, no need to explicitly deploy
- name: build and push latest docker image to GCR
run: |
docker build -t ghcr.io/codfish/semantic-release-action:latest .
docker push ghcr.io/codfish/semantic-release-action:latest
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64,linux/amd64
push: true
tags: ghcr.io/codfish/semantic-release-action:latest

- name: push docker images for releases to GCR
if: steps.semantic.outputs.new-release-published == 'true'
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ jobs:
env:
OUTPUTS: ${{ toJson(steps.semantic.outputs) }}

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

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

- name: docker login
run: |
echo "$GCR_TOKEN" | docker login ghcr.io -u codfish --password-stdin
Expand All @@ -72,6 +80,9 @@ jobs:

# Dockerhub is auto synced with the repo, no need to explicitly deploy
- name: build and push branch docker image to GCR
run: |
docker build -t ghcr.io/codfish/semantic-release-action:$GITHUB_HEAD_REF .
docker push ghcr.io/codfish/semantic-release-action:$GITHUB_HEAD_REF
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64,linux/amd64
push: true
tags: ghcr.io/codfish/semantic-release-action:${{ github.head_ref }}

0 comments on commit ac1b7f3

Please sign in to comment.