diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 533e539..5bece6c 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -2,11 +2,19 @@ name: Build container on: push: - pull_request: - # Build regularly in order to have up to date base images in the edge image + branches: + - main + tags: + - v* + workflow_dispatch: + # Build regularly in order to have up to date base image in the edge image schedule: - cron: '42 2 * * 6' # weekly on Saturday 2:42 UTC +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: contents: read packages: write @@ -30,16 +38,15 @@ jobs: - uses: docker/setup-buildx-action@v3 - name: Login to GHCR - if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - uses: docker/build-push-action@v5 + - uses: docker/build-push-action@v6 with: platforms: linux/amd64, linux/arm64/v8 - push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}