Skip to content

Commit

Permalink
ci(container): run only on main and version tags
Browse files Browse the repository at this point in the history
  • Loading branch information
EdJoPaTo committed May 8, 2024
1 parent 364203c commit 33e4c18
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ name: Build container

on:
push:
pull_request:
branches:
- main
tags:
- v*
workflow_dispatch:
# Build regularly in order to have up to date base images in the edge image
# 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

Expand All @@ -31,7 +34,6 @@ 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
Expand All @@ -41,6 +43,6 @@ jobs:
- uses: docker/build-push-action@v5
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 }}

0 comments on commit 33e4c18

Please sign in to comment.