Skip to content

Commit

Permalink
ci: Switch to GitHub App token (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelburnham authored Aug 18, 2024
1 parent a2f66fa commit c4041b3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,15 @@ jobs:
path: ${{ github.workspace }}/${{ env.MOVE_FIXTURE_PATH }}
pattern: "move_*"
merge-multiple: true
- uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.TOKEN_APP_ID }}
private_key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: "${{ secrets.REPO_TOKEN }}"
token: ${{ steps.generate-token.outputs.token }}
branch: "ci-update-fixtures"
title: "chore: Update fixtures"
commit-message: "chore: Update fixtures"
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/rust-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,18 @@ jobs:
run: |
sed -i 's/channel = .*/channel = "nightly-${{ env.RUST_VERSION }}"/' rust-toolchain.toml
working-directory: ${{ github.workspace }}/${{ matrix.package }}
- uses: tibdex/github-app-token@v2
if: steps.compare-versions.outputs.outdated == 'true'
id: generate-token
with:
app_id: ${{ secrets.TOKEN_APP_ID }}
private_key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }}
# Open PR if Rust version is out of date with latest nightly
- name: Create Pull Request
if: steps.compare-versions.outputs.outdated == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.REPO_TOKEN }}
token: ${{ steps.generate-token.outputs.token }}
branch: "ci-update-rust-version-${{ matrix.package }}"
title: "chore: Update `${{ matrix.package }}` Rust version to `nightly-${{ env.RUST_VERSION }}`"
commit-message: "chore: Update `${{ matrix.package }}` Rust version to `nightly-${{ env.RUST_VERSION }}`"
Expand Down

0 comments on commit c4041b3

Please sign in to comment.