From f7cdc235f27a245f4c1acca54b77c65effa80b91 Mon Sep 17 00:00:00 2001 From: marshtompsxd Date: Thu, 7 Sep 2023 00:19:46 -0500 Subject: [PATCH] Add workflow for deleting packages (#244) Signed-off-by: Xudong Sun --- .github/workflows/delete-pkg.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/delete-pkg.yml diff --git a/.github/workflows/delete-pkg.yml b/.github/workflows/delete-pkg.yml new file mode 100644 index 000000000..ac745f4e1 --- /dev/null +++ b/.github/workflows/delete-pkg.yml @@ -0,0 +1,19 @@ +on: + workflow_dispatch: + inputs: + image: + description: 'Name of the image to be deleted' + required: true + type: string +jobs: + use_api: + runs-on: ubuntu-20.04 + permissions: + contents: read + packages: write + steps: + - name: Delete packages + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh api --method DELETE -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /orgs/vmware-research/packages/container/verifiable-controllers%2F${{ inputs.image }}