Skip to content

Commit

Permalink
Add action to delete branch from remote
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall authored May 28, 2024
1 parent b33d13d commit 16d9a54
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/gitlab-del-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Delete branch from GitLab
on:
delete:
branches: '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Delete branch
env:
GITLAB_USERNAME: "project_34868_bot"
GITLAB_PASSWORD: ${{ secrets.GITLAB_PASSWORD }}
GITLAB_HOSTNAME: "git.drupal.org"
GITLAB_PATH: "project/islandora"
run: |
git remote add gitlab "https://$GITLAB_USERNAME:$GITLAB_PASSWORD@$GITLAB_HOSTNAME/$GITLAB_PATH"
git push gitlab :${GITHUB_REF#refs/heads/}
2 changes: 0 additions & 2 deletions .github/workflows/gitlab-mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches: '*'
tags: '*'
delete:
branches: '*'

jobs:
build:
Expand Down

0 comments on commit 16d9a54

Please sign in to comment.