Skip to content

Commit

Permalink
fix(github): restrict running of action to initial commit on main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
trieloff committed Jul 18, 2023
1 parent 0c2dae8 commit 1a990c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cleanup-on-create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
permissions:
contents: write
actions: write
# only run if commit message is "Initial commit" on main branch
if: ${{ github.ref == 'refs/heads/main' && github.event.head_commit.message == 'Initial commit' }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down

0 comments on commit 1a990c2

Please sign in to comment.