caddy-docker-rfc2136/.forgejo/workflows/image.yaml

43 lines
1 KiB
YAML
Raw Normal View History

2024-12-28 21:40:40 +13:00
name: Build and Push Updated Images
run-name: Build and Push Updated Images 🚀
on:
push:
branches:
- main
paths:
- Dockerfile
workflow_dispatch:
jobs:
build-image:
runs-on: docker
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Extract metadata (tags, labels) for Docker
id: meta
2024-12-28 22:13:32 +13:00
uses: docker/metadata-action@v5.6.1
2024-12-28 21:40:40 +13:00
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
2024-12-28 22:13:32 +13:00
uses: docker/setup-buildx-action@v3.8.0
2024-12-28 21:40:40 +13:00
- name: Build and push Docker image
id: push
2024-12-28 22:13:32 +13:00
uses: docker/build-push-action@v6.10.0
2024-12-28 21:40:40 +13:00
with:
context: .
file: ./Dockerfile
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}