Files
caddy-hetzner/.gitea/workflows/docker-publish.yaml
scott 97650d8743
All checks were successful
Docker Build and Publish / Build Docker image amd publish to Gitea (push) Successful in 1m49s
Changed cron time
2025-08-26 22:32:25 -04:00

58 lines
1.5 KiB
YAML

name: Docker Build and Publish
on:
schedule:
- cron: '30 7 * * SUN'
push:
branches: [ "main" ]
paths-ignore:
- '**/README.md'
pull_request:
branches: [ "main" ]
paths-ignore:
- '**/README.md'
workflow_dispatch:
jobs:
## define job to build and publish docker image
build-and-push-docker-image:
name: Build Docker image amd publish to Gitea
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
## This is used to complete the identity challenge
## with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
## https://github.com/docker/build-push-action
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
## https://github.com/docker/login-action
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: gitea.sdgarren.com
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
## https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
provenance: false
context: .
platforms: linux/amd64
push: true
tags: |
gitea.sdgarren.com/scott/caddy-hetzner:latest
- name: Image digest
run: echo ${{ steps.build-and-push.outputs.digest }}