Add workflow to document this on Docker Hub

Also update the build workflow to only run for tagged pushes to main or workflow dispatch
This commit is contained in:
Matt Harlum 2025-06-05 21:31:48 +12:00
parent 698a69d45f
commit 6e18506ed9
2 changed files with 26 additions and 1 deletions

View File

@ -8,6 +8,7 @@ on:
jobs:
build:
if: github.event.base_ref == 'refs/heads/main' || github.event.ref == 'refs/heads/main'
strategy:
fail-fast: false
matrix:
@ -89,7 +90,7 @@ jobs:
images: |
${{ vars.DOCKERHUB_REPO }}
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=latest
type=sha
type=ref,event=branch
type=ref,event=pr

24
.github/workflows/document.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Update Docker Hub Description
on:
push:
branches:
- main
paths:
- README.md
- .github/workflows/document.yml
workflow_dispatch:
jobs:
description:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ vars.DOCKERHUB_REPO }}
readme-filepath: ./README.md
short-description: ${{ github.event.repository.description }}
enable-url-completion: true