ci: Delete branch after successful Elastic update merge

This commit is contained in:
Antoine Cotten 2021-11-11 19:08:42 +01:00
parent 8055143d52
commit e6f9ec49d2
No known key found for this signature in database
GPG Key ID: 94637E68D4A79DD0
1 changed files with 10 additions and 0 deletions

View File

@ -22,3 +22,13 @@ jobs:
with: with:
GITHUB_LOGIN: docker-elk-updater GITHUB_LOGIN: docker-elk-updater
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete branch
uses: actions/github-script@v5
with:
script: |
await github.request('DELETE /repos/{owner}/{repo}/git/refs/{ref}', {
owner: '${{ github.event.workflow_run.repository.owner.login }}',
repo: '${{ github.event.workflow_run.repository.name }}',
ref: 'heads/${{ github.event.workflow_run.head_branch }}'
})