Skip to content

Commit

Permalink
build image for arm64 arch
Browse files Browse the repository at this point in the history
  • Loading branch information
tiero committed Nov 23, 2021
1 parent e4f5067 commit a73d085
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,32 @@ jobs:
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'

permissions:
contents: read
packages: write
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"

steps:
- uses: actions/checkout@v2

- name: Build image
run: docker build . --file ./$VERSION/Dockerfile --tag $IMAGE_NAME

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

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push image
run: |
IMAGE_ID=ghcr.io/vulpemventures/$IMAGE_NAME
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:latest
docker push $IMAGE_ID:latest
- name: Build image
run: >-
docker buildx build --push
--file ./$VERSION/Dockerfile
--tag ghcr.io/vulpemventures/$IMAGE_NAME:latest
--tag ghcr.io/vulpemventures/$IMAGE_NAME:$VERSION
--platform linux/arm64,linux/amd64 .

0 comments on commit a73d085

Please sign in to comment.