Skip to content

Commit

Permalink
ci(conditions): Add commit with github app and skip condition when au…
Browse files Browse the repository at this point in the history
…tomatic release (#50)
  • Loading branch information
juancgalvis authored May 6, 2024
1 parent 79915de commit ce1e4a4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,22 @@ on:
- main
jobs:
build:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
permissions:
contents: write
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate_token
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
with:
token: ${{ steps.generate_token.outputs.token }}
- name: Verify Conventional Commits
uses: amannn/action-semantic-pull-request@v5
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
Expand All @@ -34,7 +43,7 @@ jobs:
if: github.ref == 'refs/heads/main'
run: npx [email protected]
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_P_A_TOKEN }}
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: Set up Elixir
uses: erlef/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
with:
github-token: ${{ steps.generate_token.outputs.token }}
push-branch: main
commit-message: "Upgrade version to ${{ env.RELEASE_VERSION }}"
commit-message: "Upgrade version to ${{ env.RELEASE_VERSION }} [skip ci]"
force-add: "true"
force-push: "true"
files: mix.exs CHANGELOG.md
Expand Down

0 comments on commit ce1e4a4

Please sign in to comment.