Skip to content

delete package by name #3

delete package by name

delete package by name #3

name: delete package by name
on:
workflow_dispatch:
inputs:
package_name:
description: 'Package name'
type: string
default: 'echo-app'
jobs:
delete-package-by-name:
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
steps:
- name: github-delete-package
shell: bash
run: |
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.DELETE_PACKAGES_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/orgs/km-demos/packages/container/${{ github.event.inputs.package_name }}