caddy/.forgejo/workflows/image.yaml
2025-05-03 22:18:21 +12:00

50 lines
No EOL
1.3 KiB
YAML

name: Build and Push Updated Images
run-name: Build and Push Updated Images 🚀
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-image:
runs-on: docker
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Login to registery
uses: docker/login-action@v3
with:
registry: git.oooo.nz
username: ${{ github.actor }}
password: ${{ secrets.PUSH_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.7.0
with:
images: caddy
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6.16.0
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
secrets: |
GIT_AUTH_TOKEN=${{ secrets.PUSH_TOKEN }}