Skip to content

Commit

Permalink
refactor(CI): use the official github app token generator action (#6230)
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored Apr 5, 2024
1 parent debb2cc commit 40dff99
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/lint-fix-if-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ jobs:
path: .eslintcache
key: eslint-v1-${{ hashFiles('.eslintrc.cjs') }}
- run: "pnpm lint:fix -- --rule 'prettier/prettier: [off]'"
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
- uses: actions/create-github-app-token@v1
# Run even if `pnpm lint:fix` fails
if: always()
id: generate-token
id: app-token
with:
app_id: ${{ secrets.ECOSPARK_APP_ID }}
private_key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
app-id: ${{ secrets.ECOSPARK_APP_ID }}
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
- uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6
# Run even if `lint:fix` fails
if: always()
Expand All @@ -76,4 +76,4 @@ jobs:
commit-message: 'chore(lint): fix linter issues 🤖 ✨'
labels: 🤖 bot
title: 'chore(lint): fix linter issues 🤖 ✨'
token: ${{ steps.generate-token.outputs.token }}
token: ${{ steps.app-token.outputs.token }}
10 changes: 5 additions & 5 deletions .github/workflows/pnpm-if-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ jobs:
run: pnpm install --config.ignore-scripts=true

- run: pnpm dedupe --config.ignore-scripts=true
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
id: generate-token
- uses: actions/create-github-app-token@v1
id: app-token
with:
app_id: ${{ secrets.ECOSPARK_APP_ID }}
private_key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
app-id: ${{ secrets.ECOSPARK_APP_ID }}
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
- uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6
with:
body: I ran `pnpm dedupe` 🧑‍💻
branch: actions/dedupe-if-needed
commit-message: 'chore(deps): dedupe pnpm-lock.yaml'
labels: 🤖 bot
title: 'chore(deps): dedupe pnpm-lock.yaml'
token: ${{ steps.generate-token.outputs.token }}
token: ${{ steps.app-token.outputs.token }}
10 changes: 5 additions & 5 deletions .github/workflows/prettier-if-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ jobs:
- run: pnpm chore:format:fix
- name: GitHub blocks PRs from automation that alter workflows in any way
run: git restore .github/workflows pnpm-lock.yaml
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
id: generate-token
- uses: actions/create-github-app-token@v1
id: app-token
with:
app_id: ${{ secrets.ECOSPARK_APP_ID }}
private_key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
app-id: ${{ secrets.ECOSPARK_APP_ID }}
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
- uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6
with:
body: I ran `pnpm prettier` 🧑‍💻
branch: actions/prettier-if-needed
commit-message: 'chore(prettier): fix unformatted files 🤖 ✨'
labels: 🤖 bot
title: 'chore(prettier): fix unformatted files 🤖 ✨'
token: ${{ steps.generate-token.outputs.token }}
token: ${{ steps.app-token.outputs.token }}

0 comments on commit 40dff99

Please sign in to comment.