Skip to content

Commit bece7d4

Browse files
committed
Update auto-release workflow for multi-arch build
- Add QEMU setup for multi-arch support - Use Buildx for building Docker images - Refactor GHCR login step - Fix version stripping logic - Set platforms for multi-arch builds
1 parent 44287f3 commit bece7d4

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/auto-release.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,32 @@ 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: |
3846
# grab the raw output (e.g. "v4.1.7")
3947
vtag="${{ steps.get-latest-release.outputs.release }}"
@@ -42,12 +50,13 @@ jobs:
4250
# expose it as an output
4351
echo "version_no_v=${clean_vtag}" >> $GITHUB_OUTPUT
4452
45-
- name: Build and push Docker image
53+
- name: Build & push multi-arch
4654
uses: docker/build-push-action@v4
4755
with:
4856
context: .
4957
file: Dockerfile
5058
push: true
59+
platforms: linux/amd64, linux/arm64
5160
tags: |
5261
ghcr.io/scriptogre/tailwindcss:latest
5362
ghcr.io/scriptogre/tailwindcss:${{ steps.strip-v.outputs.version_no_v }}

0 commit comments

Comments
 (0)