Skip to content

Commit

Permalink
Publish multi-arch images without auth0
Browse files Browse the repository at this point in the history
  • Loading branch information
Malte-Hansen committed Nov 13, 2024
1 parent 734db1e commit f78af75
Showing 1 changed file with 5 additions and 26 deletions.
31 changes: 5 additions & 26 deletions .github/workflows/deploy-docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI Pipeline
name: Docker Hub Pipeline

on:
push:
Expand Down Expand Up @@ -83,6 +83,7 @@ jobs:
needs: [test, linting]
env:
VERSION_TAG: ${{ github.ref_name }}-${{ github.sha }}
AUTH0_ENABLED: 'false'
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -114,9 +115,6 @@ jobs:
runs-on: ubuntu-latest
needs: [build]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
strategy:
matrix:
platform: [linux/amd64, linux/arm64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -132,28 +130,9 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image (amd64)
- name: Build and push multi-arch Docker image
run: |
export PLATFORM=$(echo ${{ matrix.platform }} | cut -d'/' -f2)
docker buildx build \
--platform ${{ matrix.platform }} \
--tag ${{ vars.DOCKER_IMAGE_NAME }}:$PLATFORM . \
--platform linux/amd64,linux/arm64 \
--tag ${{ vars.DOCKER_IMAGE_NAME }}:latest . \
--push
publish-multi-arch:
runs-on: ubuntu-latest
needs: [build-and-deploy]
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Container Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish multi-arch image
run: |
docker buildx imagetools create \
-t ${{ vars.DOCKER_IMAGE_NAME }}:latest \
${{ vars.DOCKER_IMAGE_NAME }}:amd64 \
${{ vars.DOCKER_IMAGE_NAME }}:arm64

0 comments on commit f78af75

Please sign in to comment.