From a9a4e1a20c9ee3bcdf5a9622ef26ee735b33f365 Mon Sep 17 00:00:00 2001 From: TwiN Date: Fri, 28 Mar 2025 17:48:35 -0400 Subject: [PATCH] cd: Add publish-latest workflow --- .github/workflows/publish-latest.yml | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/publish-latest.yml diff --git a/.github/workflows/publish-latest.yml b/.github/workflows/publish-latest.yml new file mode 100644 index 0000000..0f978d8 --- /dev/null +++ b/.github/workflows/publish-latest.yml @@ -0,0 +1,33 @@ +name: publish-latest +on: + push: + branches: [main] +concurrency: + group: ${{ github.event.workflow_run.head_repository.full_name }}::${{ github.event.workflow_run.head_branch }}::${{ github.workflow }} + cancel-in-progress: true +jobs: + publish-latest: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + - name: Get image repository + run: echo IMAGE_REPOSITORY=$(echo ghcr.io/${{ github.actor }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + - name: Login to registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + platforms: linux/amd64 + pull: true + push: true + tags: ${{ env.IMAGE_REPOSITORY }}:latest