ci(workflows): cleanup PR Docker images

This commit is contained in:
Julien Neuhart
2025-01-24 10:25:25 +01:00
parent 09e511bc49
commit 6ce47e3a20
2 changed files with 42 additions and 0 deletions

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

@@ -0,0 +1,24 @@
on:
workflow_call:
inputs:
gotenberg_version:
type: string
required: true
alternate_repository:
type: string
default: ''
permissions:
contents: read
jobs:
delete:
runs-on: ubuntu-latest
steps:
- name: Delete
uses: gotenberg/gotenberg-release-action/actions/delete@main
with:
docker_hub_username: ${{ secrets.DOCKERHUB_USERNAME }}
docker_hub_password: ${{ secrets.DOCKERHUB_TOKEN }}
version: ${{ inputs.gotenberg_version }}
alternate_repository: ${{ inputs.alternate_repository }}

View File

@@ -0,0 +1,18 @@
name: Pull Request Cleanup
on:
pull_request:
types: [ closed ]
permissions:
contents: read
jobs:
cleanup:
name: Cleanup
uses: ./.github/workflows/__delete.yml
secrets: inherit
with:
gotenberg_version: pr-${{ github.event.pull_request.number }}
alternate_repository: snapshot