@@ -23,61 +23,71 @@ jobs:
23
23
- name : List files in directory
24
24
run : ls -la
25
25
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
27
33
- name : Set up Docker Buildx
28
34
uses : docker/setup-buildx-action@v2
29
35
30
- # 4 ) Log in to Docker Hub
36
+ # 5 ) Log in to Docker Hub
31
37
- name : Log in to Docker Hub
32
38
if : github.event_name != 'pull_request'
33
39
uses : docker/login-action@v2
34
40
with :
35
41
username : ${{ secrets.DOCKERHUB_USERNAME }}
36
42
password : ${{ secrets.DOCKERHUB_PASSWORD }}
37
43
38
- # 5 ) Extract version from tag if it's a tag push
44
+ # 6 ) Extract version from tag if it's a tag push
39
45
- name : Extract version from tag
40
46
if : startsWith(github.ref, 'refs/tags/')
41
47
id : get_version
42
48
run : echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
43
49
44
- # 6a ) Build & Push if on 'main' branch
50
+ # 7a ) Build & Push if on 'main' branch
45
51
- name : Build and Push (main)
46
52
if : github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
47
53
uses : docker/build-push-action@v3
48
54
with :
49
55
context : .
50
56
push : true
57
+ platforms : linux/amd64,linux/arm64
51
58
tags : |
52
59
huntarr/4readarr:latest
53
60
huntarr/4readarr:${{ github.sha }}
54
61
55
- # 6b ) Build & Push if on 'dev' branch
62
+ # 7b ) Build & Push if on 'dev' branch
56
63
- name : Build and Push (dev)
57
64
if : github.ref == 'refs/heads/dev' && github.event_name != 'pull_request'
58
65
uses : docker/build-push-action@v3
59
66
with :
60
67
context : .
61
68
push : true
69
+ platforms : linux/amd64,linux/arm64
62
70
tags : |
63
71
huntarr/4readarr:dev
64
72
huntarr/4readarr:${{ github.sha }}
65
73
66
- # 6c ) Build & Push if it's a tag/release
74
+ # 7c ) Build & Push if it's a tag/release
67
75
- name : Build and Push (release)
68
76
if : startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request'
69
77
uses : docker/build-push-action@v3
70
78
with :
71
79
context : .
72
80
push : true
81
+ platforms : linux/amd64,linux/arm64
73
82
tags : |
74
83
huntarr/4readarr:${{ steps.get_version.outputs.VERSION }}
75
84
huntarr/4readarr:latest
76
85
77
- # 6d ) Just build on pull requests
86
+ # 7d ) Just build on pull requests
78
87
- name : Build (PR)
79
88
if : github.event_name == 'pull_request'
80
89
uses : docker/build-push-action@v3
81
90
with :
82
91
context : .
83
- push : false
92
+ push : false
93
+ platforms : linux/amd64,linux/arm64
0 commit comments