34 lines
816 B
YAML
34 lines
816 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
schedule:
|
|
# Run every Sunday at 00:00 UTC (adjust cron syntax as needed)
|
|
- cron: "0 0 * * 0"
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: docker
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to Docker Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.k4li.de
|
|
# username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.FORGEJO_ACCESSTOKEN }}
|
|
|
|
- name: Build and Push Docker Image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
platforms: linux/amd64
|
|
push: true
|
|
tags: |
|
|
docker/caddy:latest
|
|
docker/caddy:${{ github.sha }}
|