Skip to content

Commit

Permalink
build(conditions): Use github app only with main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
juancgalvis committed Jul 9, 2024
1 parent 9a97034 commit 381bb0c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,18 @@ jobs:
steps:
- name: Generate a token
id: generate_token
if: github.ref == 'refs/heads/main'
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID_ADMIN_GITHUB }}
private_key: ${{ secrets.APP_PRIVATE_KEY_ADMIN_GITHUB }}
- uses: actions/checkout@v4
if: github.ref == 'refs/heads/main'
with:
token: ${{ steps.generate_token.outputs.token }}
- uses: actions/checkout@v4
if: github.ref != 'refs/heads/main'

- name: Verify Conventional Commits
uses: amannn/action-semantic-pull-request@v5
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
Expand Down

0 comments on commit 381bb0c

Please sign in to comment.