Skip to content

Commit

Permalink
Update cleanup-on-create.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
gargadobe authored Apr 4, 2024
1 parent 945c725 commit de3f824
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/cleanup-on-create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ on:
create:
branches:
- main
workflow_dispatch:
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
contents: write
actions: write
# only run if commit message is "Initial commit" on main branch
if: ${{ github.ref == 'refs/heads/main' && ( !(contains(github.event, 'head_commit') || github.event.head_commit.message == 'Initial commit') ) }}
if: ${{ github.event_name == 'workflow_dispatch' || ( github.ref == 'refs/heads/main' && !(contains(github.event, 'head_commit') || github.event.head_commit.message == 'Initial commit' )) }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit de3f824

Please sign in to comment.