@@ -23,61 +23,71 @@ jobs:
2323 - name : List files in directory
2424 run : ls -la
2525
26- # 3) Set up Docker Buildx
26+ # 3) Set up QEMU for multi-architecture builds
27+ - name : Set up QEMU
28+ uses : docker/setup-qemu-action@v2
29+ with :
30+ platforms : arm64,amd64
31+
32+ # 4) Set up Docker Buildx
2733 - name : Set up Docker Buildx
2834 uses : docker/setup-buildx-action@v2
2935
30- # 4 ) Log in to Docker Hub
36+ # 5 ) Log in to Docker Hub
3137 - name : Log in to Docker Hub
3238 if : github.event_name != 'pull_request'
3339 uses : docker/login-action@v2
3440 with :
3541 username : ${{ secrets.DOCKERHUB_USERNAME }}
3642 password : ${{ secrets.DOCKERHUB_PASSWORD }}
3743
38- # 5 ) Extract version from tag if it's a tag push
44+ # 6 ) Extract version from tag if it's a tag push
3945 - name : Extract version from tag
4046 if : startsWith(github.ref, 'refs/tags/')
4147 id : get_version
4248 run : echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
4349
44- # 6a ) Build & Push if on 'main' branch
50+ # 7a ) Build & Push if on 'main' branch
4551 - name : Build and Push (main)
4652 if : github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
4753 uses : docker/build-push-action@v3
4854 with :
4955 context : .
5056 push : true
57+ platforms : linux/amd64,linux/arm64
5158 tags : |
5259 huntarr/4radarr:latest
5360 huntarr/4radarr:${{ github.sha }}
5461
55- # 6b ) Build & Push if on 'dev' branch
62+ # 7b ) Build & Push if on 'dev' branch
5663 - name : Build and Push (dev)
5764 if : github.ref == 'refs/heads/dev' && github.event_name != 'pull_request'
5865 uses : docker/build-push-action@v3
5966 with :
6067 context : .
6168 push : true
69+ platforms : linux/amd64,linux/arm64
6270 tags : |
6371 huntarr/4radarr:dev
6472 huntarr/4radarr:${{ github.sha }}
6573
66- # 6c ) Build & Push if it's a tag/release
74+ # 7c ) Build & Push if it's a tag/release
6775 - name : Build and Push (release)
6876 if : startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request'
6977 uses : docker/build-push-action@v3
7078 with :
7179 context : .
7280 push : true
81+ platforms : linux/amd64,linux/arm64
7382 tags : |
7483 huntarr/4radarr:${{ steps.get_version.outputs.VERSION }}
7584 huntarr/4radarr:latest
7685
77- # 6d ) Just build on pull requests
86+ # 7d ) Just build on pull requests
7887 - name : Build (PR)
7988 if : github.event_name == 'pull_request'
8089 uses : docker/build-push-action@v3
8190 with :
8291 context : .
83- push : false
92+ push : false
93+ platforms : linux/amd64,linux/arm64
0 commit comments