Skip to content

Commit

Permalink
Add arm64 image
Browse files Browse the repository at this point in the history
  • Loading branch information
nbudin committed Sep 1, 2023
1 parent 9b27a8f commit 98ba5b6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:
- uses: actions/checkout@v3
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
Expand All @@ -70,11 +72,13 @@ jobs:
with:
context: .
push: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ github.repository }}:${{ github.sha }}
build-args: |
RUBY_VERSION=${{ steps.ruby-version.outputs.ruby-version }}
cache-from: type=gha
cache-to: type=gha,mode=max
update-release-draft:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main'
Expand Down
26 changes: 17 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@ jobs:
docker-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Pull built image
run: docker pull ghcr.io/${{ github.repository }}:${{ github.sha }}
- name: Tag image with version Tag
run: docker tag ghcr.io/${{ github.repository }}:${{ github.sha }} ghcr.io/${{ github.repository }}:${{ github.event.release.name }}
- name: Tag image as latest
run: docker tag ghcr.io/${{ github.repository }}:${{ github.sha }} ghcr.io/${{ github.repository }}:latest
- name: Push to registry
run: docker push ghcr.io/${{ github.repository }}:latest && docker push ghcr.io/${{ github.repository }}:${{ github.event.release.name }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Write dockerfile for release
run: |
echo "FROM ghcr.io/${{ github.repository }}:${{ github.sha }}" >Dockerfile
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ github.repository }}:${{ github.event.release.name }}
ghcr.io/${{ github.repository }}:latest

0 comments on commit 98ba5b6

Please sign in to comment.