Skip to content

Auto Release

Auto Release #7

Workflow file for this run

name: Auto Build TailwindCSS Image
on:
schedule:
- cron: '0 0 * * *' # daily at 00:00 UTC
workflow_dispatch: # manual trigger via `Actions` tab
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Enable QEMU for multi-arch support
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Boot up Buildx
uses: docker/setup-buildx-action@v2
- name: Check out code
uses: actions/checkout@v4
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest TailwindCSS release
id: get-latest-release
uses: pozetroninc/github-action-get-latest-release@v0.8.0
with:
repository: tailwindlabs/tailwindcss
- name: Strip leading “v” from version
id: strip-v
run: |
# grab the raw output (e.g. "v4.1.7")
vtag="${{ steps.get-latest-release.outputs.release }}"
# remove one leading “v”
clean_vtag="${vtag#v}"
# expose it as an output
echo "version_no_v=${clean_vtag}" >> $GITHUB_OUTPUT
- name: Build & push multi-arch
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
push: true
platforms: linux/amd64, linux/arm64
tags: |
ghcr.io/scriptogre/tailwindcss:latest
ghcr.io/scriptogre/tailwindcss:${{ steps.strip-v.outputs.version_no_v }}
build-args: |
TAILWINDCSS_VERSION=${{ steps.strip-v.outputs.version_no_v }}