mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-22 13:49:26 -04: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
2 changed files with 26 additions and 0 deletions
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
|
required: false
|
||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
dryrun:
|
||||||
|
description: --dryrun flag
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
command:
|
command:
|
||||||
|
@ -69,6 +74,11 @@ on:
|
||||||
description: --all flag
|
description: --all flag
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
dryrun:
|
||||||
|
description: --dryrun flag
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
outputs:
|
outputs:
|
||||||
output:
|
output:
|
||||||
description: Output of the command
|
description: Output of the command
|
||||||
|
@ -175,6 +185,7 @@ jobs:
|
||||||
add_latest=$([[ "${{ inputs.add_latest }}" == "true" ]] && echo "--latest" || echo "")
|
add_latest=$([[ "${{ inputs.add_latest }}" == "true" ]] && echo "--latest" || echo "")
|
||||||
add_release=$([[ "${{ inputs.add_release }}" == "true" ]] && echo "--release" || echo "")
|
add_release=$([[ "${{ inputs.add_release }}" == "true" ]] && echo "--release" || echo "")
|
||||||
rm_all=$([[ "${{ inputs.rm_all }}" == "true" ]] && echo "--all" || echo "")
|
rm_all=$([[ "${{ inputs.rm_all }}" == "true" ]] && echo "--all" || echo "")
|
||||||
|
dryrun=$([[ "${{ inputs.dryrun }}" == "true" ]] && echo "--dryrun" || echo "")
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
out=$(
|
out=$(
|
||||||
|
@ -185,6 +196,7 @@ jobs:
|
||||||
${add_latest} \
|
${add_latest} \
|
||||||
${add_release} \
|
${add_release} \
|
||||||
${rm_all} \
|
${rm_all} \
|
||||||
|
${dryrun} \
|
||||||
--verbose
|
--verbose
|
||||||
)
|
)
|
||||||
echo "$out"
|
echo "$out"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue