mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-13 08:29:38 -05:00
ci: add purge branch workflow
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
d24fac00f0
commit
636567d65a
14
.github/workflows/purge-branch.yml
vendored
Normal file
14
.github/workflows/purge-branch.yml
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
name: Purge branch
|
||||
|
||||
on:
|
||||
delete:
|
||||
|
||||
jobs:
|
||||
purge:
|
||||
name: Delete ref from versions API
|
||||
uses: ./.github/workflows/versionsapi.yml
|
||||
with:
|
||||
command: rm
|
||||
rm_all: true
|
||||
dryrun: true
|
||||
ref: ${{ github.event.ref }}
|
12
.github/workflows/versionsapi.yml
vendored
12
.github/workflows/versionsapi.yml
vendored
@ -39,6 +39,11 @@ on:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
dryrun:
|
||||
description: --dryrun flag
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
workflow_call:
|
||||
inputs:
|
||||
command:
|
||||
@ -69,6 +74,11 @@ on:
|
||||
description: --all flag
|
||||
required: false
|
||||
type: boolean
|
||||
dryrun:
|
||||
description: --dryrun flag
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
outputs:
|
||||
output:
|
||||
description: Output of the command
|
||||
@ -175,6 +185,7 @@ jobs:
|
||||
add_latest=$([[ "${{ inputs.add_latest }}" == "true" ]] && echo "--latest" || echo "")
|
||||
add_release=$([[ "${{ inputs.add_release }}" == "true" ]] && echo "--release" || echo "")
|
||||
rm_all=$([[ "${{ inputs.rm_all }}" == "true" ]] && echo "--all" || echo "")
|
||||
dryrun=$([[ "${{ inputs.dryrun }}" == "true" ]] && echo "--dryrun" || echo "")
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
out=$(
|
||||
@ -185,6 +196,7 @@ jobs:
|
||||
${add_latest} \
|
||||
${add_release} \
|
||||
${rm_all} \
|
||||
${dryrun} \
|
||||
--verbose
|
||||
)
|
||||
echo "$out"
|
||||
|
Loading…
Reference in New Issue
Block a user