ddd
This commit is contained in:
parent
b70cbc87d7
commit
1239fcb050
1 changed files with 15 additions and 5 deletions
|
@ -1,13 +1,15 @@
|
||||||
name: "lint, build and push"
|
name: "lint, build and push"
|
||||||
|
# https://docs.docker.com/build/ci/github-actions/manage-tags-labels/
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "32 17 * * SUN"
|
- cron: "0 10 * * *"
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches:
|
||||||
|
- "**"
|
||||||
|
tags:
|
||||||
|
- "v*.*.*"
|
||||||
pull_request:
|
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:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
steps:
|
steps:
|
||||||
|
@ -46,6 +48,14 @@ jobs:
|
||||||
needs: [gitleaks, hadolint] # shellcheck
|
needs: [gitleaks, hadolint] # shellcheck
|
||||||
steps:
|
steps:
|
||||||
- uses: https://github.com/actions/checkout@v4
|
- 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
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
# - name: Login to Docker Hub
|
# - name: Login to Docker Hub
|
||||||
|
@ -67,7 +77,7 @@ jobs:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
push: true
|
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
|
- name: Send notification
|
||||||
uses: dawidd6/action-send-mail@v3
|
uses: dawidd6/action-send-mail@v3
|
||||||
if: failure()
|
if: failure()
|
||||||
|
|
Loading…
Reference in a new issue