Update .github/workflows/delete_packages.yml
Some checks failed
Build Docker Image / build_docker (push) Failing after 3m31s
Lint / run (push) Failing after 1m0s
Build, check & Test / run (push) Successful in 7m46s

This commit is contained in:
Florian Bouillon 2024-05-24 05:54:48 +00:00
parent eb3b41be72
commit 136a7e86f3

View File

@ -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 }}