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