Files
eleith 66d9f94216
ci/woodpecker/pr/build-dane-verify Pipeline was successful
ci/woodpecker/pr/build-porkbun-ddns Pipeline was successful
ci/woodpecker/push/build-dane-verify Pipeline was successful
ci/woodpecker/push/build-hledger Pipeline was successful
ci/woodpecker/push/build-nvim Pipeline was successful
ci/woodpecker/push/build-playwright Pipeline was successful
ci/woodpecker/push/build-porkbun-ddns Pipeline was successful
Align CI tags, PR checks, and docs
2026-10-24 08:56:01 -07:00

86 lines
2.4 KiB
YAML

name: Build and Push dane-verify
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- "dane-verify/**"
- ".github/workflows/build-dane-verify.yml"
push:
branches:
- main
paths:
- "dane-verify/**"
- ".github/workflows/build-dane-verify.yml"
tags:
- "dane-verify/v*"
jobs:
checks:
name: DANE checks
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bats
uses: bats-core/bats-action@3.0.0
- name: Run tests
run: bats dane-verify/tests/
build:
if: github.event_name != 'pull_request'
needs: checks
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract tag name
id: tag_name
run: |
if [[ "${{ github.ref_type }}" == "tag" ]]; then
TAG="${{ github.ref_name }}"
VERSION="${TAG#dane-verify/v}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
fi
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/containers-dane-verify
flavor: latest=false
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=semver,pattern={{version}},value=${{ steps.tag_name.outputs.version }},enable=${{ github.ref_type == 'tag' }}
type=semver,pattern={{major}}.{{minor}},value=${{ steps.tag_name.outputs.version }},enable=${{ github.ref_type == 'tag' }}
type=semver,pattern={{major}},value=${{ steps.tag_name.outputs.version }},enable=${{ github.ref_type == 'tag' }}
- name: Login to GitHub Container Registry
if: github.ref == 'refs/heads/main' || github.ref_type == 'tag'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ./dane-verify
file: ./dane-verify/Dockerfile
push: ${{ github.ref == 'refs/heads/main' || github.ref_type == 'tag' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}