From b0e33c332122717ebe5b322d418454c770f1a20e Mon Sep 17 00:00:00 2001 From: CyferShepard Date: Fri, 14 Jun 2024 16:18:03 +0200 Subject: [PATCH] chore: Update docker-latest.yml for branch name change --- .github/workflows/docker-latest.yml | 68 ++++++++++++++--------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/docker-latest.yml b/.github/workflows/docker-latest.yml index e1c34bd..efe2c46 100644 --- a/.github/workflows/docker-latest.yml +++ b/.github/workflows/docker-latest.yml @@ -3,46 +3,46 @@ on: push: tags: - "v*.*.*" - branches: [ latest ] + branches: [main] jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - # list of Docker images to use as base name for tags - images: ${{ github.repository }} - # generate Docker tags based on the following events/attributes - tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + # list of Docker images to use as base name for tags + images: ${{ github.repository }} + # generate Docker tags based on the following events/attributes + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} - - - name: Build Docker image - uses: docker/build-push-action@v5 - with: - context: . - push: true - tags: latest - platforms: linux/amd64,linux/arm64,linux/arm/v7 + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + + - name: Build Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags == 'main' && 'docker.io/cyfershepard/jellystat:latest' || format('docker.io/cyfershepard/jellystat:{0}', steps.meta.outputs.tags)}} + platforms: linux/amd64,linux/arm64,linux/arm/v7