Skip to content

Commit 8254cbb

Browse files
committed
Update auto-release for multi-arch support
- Add QEMU for multi-arch - Use Buildx - Refactor checkout step naming - Refactor GHCR login step naming - Update Docker build to multi-arch
1 parent 44287f3 commit 8254cbb

1 file changed

Lines changed: 19 additions & 14 deletions

File tree

.github/workflows/auto-release.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)