@@ -16,38 +16,43 @@ jobs:
1616 id-token : write
1717
1818 steps :
19- - name : Checkout repository (containing the Dockerfile)
19+ - name : Enable QEMU for multi-arch support
20+ uses : docker/setup-qemu-action@v2
21+ with :
22+ platforms : all
23+
24+ - name : Boot up Buildx
25+ uses : docker/setup-buildx-action@v2
26+
27+ - name : Check out code
2028 uses : actions/checkout@v4
2129
22- - name : Authenticate with GHCR
30+ - name : Login to GHCR
2331 uses : docker/login-action@v3
2432 with :
2533 registry : ghcr.io
2634 username : ${{ github.actor }}
2735 password : ${{ secrets.GITHUB_TOKEN }}
2836
29- - id : get- latest- release
30- name : Fetch latest TailwindCSS release
37+ - name : Fetch latest TailwindCSS release
38+ id : get- latest- release
3139 uses : pozetroninc/github-action-get-latest-release@v0.8.0
3240 with :
3341 repository : tailwindlabs/tailwindcss
3442
35- - id : strip-v
36- name : Strip leading “v” from version
43+ - name : Strip leading “v” from version
44+ id : strip-v
3745 run : |
38- # grab the raw output (e.g. "v4.1.7")
39- vtag="${{ steps.get-latest-release.outputs.release }}"
40- # remove one leading “v”
41- clean_vtag="${vtag#v}"
42- # expose it as an output
43- echo "version_no_v=${clean_vtag}" >> $GITHUB_OUTPUT
44-
45- - name : Build and push Docker image
46+ v="${{ steps.get-latest.outputs.release }}"
47+ echo "clean=${v#v}" >> $GITHUB_OUTPUT
48+
49+ - name : Build & push multi-arch
4650 uses : docker/build-push-action@v4
4751 with :
4852 context : .
4953 file : Dockerfile
5054 push : true
55+ platforms : linux/amd64, linux/arm64
5156 tags : |
5257 ghcr.io/scriptogre/tailwindcss:latest
5358 ghcr.io/scriptogre/tailwindcss:${{ steps.strip-v.outputs.version_no_v }}
0 commit comments