Update .github/workflows/delete_packages.yml
This commit is contained in:
parent
eb3b41be72
commit
136a7e86f3
19
.github/workflows/delete_packages.yml
vendored
19
.github/workflows/delete_packages.yml
vendored
@ -7,25 +7,25 @@ on:
|
||||
- closed
|
||||
# Run when a branch is deleted
|
||||
delete:
|
||||
|
||||
# Config
|
||||
|
||||
# Configuration for deleting a package
|
||||
env:
|
||||
TOKEN: ${{ secrets.GIT_TOKEN }}
|
||||
TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
GROUP: avior
|
||||
PACKAGE: template-web-astro
|
||||
TYPE: container
|
||||
PACKAGE: ifremer-loop
|
||||
|
||||
jobs:
|
||||
pull_request:
|
||||
name: Delete the package on a closed Pull Request
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' && github.event.action == 'close' }}
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- name: Delete package
|
||||
run: |
|
||||
curl --fail -X 'DELETE' "https://git.dzeio.com/api/v1/packages/${GROUP}/${TYPE}/${PACKAGE}/${VERSION}" -H 'accept: application/json' -H "Authorization: token ${TOKEN}"
|
||||
env:
|
||||
VERSION: pr-${{ github.event.number }}-head
|
||||
VERSION: pr-${{ github.event.number }}
|
||||
branch:
|
||||
runs-on: ubuntu-latest
|
||||
name: Delete the package on a deleted branch
|
||||
@ -35,8 +35,5 @@ jobs:
|
||||
run: |
|
||||
curl --fail -X 'DELETE' "https://git.dzeio.com/api/v1/packages/${GROUP}/${TYPE}/${PACKAGE}/${VERSION}" -H 'accept: application/json' -H "Authorization: token ${TOKEN}"
|
||||
env:
|
||||
TOKEN: ${{ secrets.GIT_TOKEN }}
|
||||
GROUP: avior
|
||||
TYPE: container
|
||||
PACKAGE: ifremer-loop
|
||||
VERSION: branch-${{ github.event.ref }}
|
||||
VERSION: ${{ github.event.ref }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user