From 1239fcb050dc4ec2bea73de66ecd4d62e9c73cb4 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Sun, 13 Oct 2024 19:31:34 +0200 Subject: [PATCH] ddd --- .gitea/workflows/build.yaml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 2b1fbed..a6c374e 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,13 +1,15 @@ name: "lint, build and push" +# https://docs.docker.com/build/ci/github-actions/manage-tags-labels/ on: schedule: - - cron: "32 17 * * SUN" + - cron: "0 10 * * *" push: - branches: [ master ] + branches: + - "**" + tags: + - "v*.*.*" pull_request: -# Variables: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables + https://forgejo.org/docs/latest/user/actions/#env-1 - jobs: lint: steps: @@ -46,6 +48,14 @@ jobs: needs: [gitleaks, hadolint] # shellcheck steps: - uses: https://github.com/actions/checkout@v4 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + # generate Docker tags based on the following events/attributes + tags: | + type=ref,event=branch + type=ref,event=pr - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 # - name: Login to Docker Hub @@ -67,7 +77,7 @@ jobs: context: . file: ./Dockerfile push: true - tags: "registry.mgrote.net/${{ steps.meta.outputs.REPO_NAME }}:latest,registry.mgrote.net/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.extract_branch.outputs.REPO_BRANCH }}" + tags: ${{ steps.meta.outputs.tags }} - name: Send notification uses: dawidd6/action-send-mail@v3 if: failure()