Skip to content

Commit

Permalink
ci: Delete branch after successful Elastic update merge
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineco committed Nov 11, 2021
1 parent 8055143 commit e6f9ec4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/update-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ jobs:
with:
GITHUB_LOGIN: docker-elk-updater
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 }}'
})

0 comments on commit e6f9ec4

Please sign in to comment.