ddd
Some checks failed
lint, build and push / lint (push) Successful in 5s
lint, build and push / lint (pull_request) Successful in 5s
lint, build and push / build (push) Has been cancelled
lint, build and push / build (pull_request) Has been cancelled

This commit is contained in:
Michael Grote 2024-10-13 19:31:34 +02:00
parent b70cbc87d7
commit 1239fcb050

View file

@ -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()