Skip to content

Commit

Permalink
chore: use github-app for authenticating Validation workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
smallTrogdor authored Jun 6, 2024
1 parent 96f067f commit 0f8ca39
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,21 @@ jobs:
test:
runs-on: macos-latest

outputs:
token: ${{ steps.app-token.outputs.token }}

steps:
- name: Generate Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.APPBAKERYGITHUBAPP_APPID }}
private-key: ${{ secrets.APPBAKERYGITHUBAPP_PRIVATEKEY }}

- name: Checkout design_system_flutter code.
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}

- name: Parse flutter version and channel specified in .fvm into env vars.
uses: kuhnroyal/flutter-fvm-config-action@v2
Expand Down Expand Up @@ -49,8 +61,17 @@ jobs:
changelog-test:
runs-on: ubuntu-latest
steps:
- name: Generate Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.APPBAKERYGITHUBAPP_APPID }}
private-key: ${{ secrets.APPBAKERYGITHUBAPP_PRIVATEKEY }}

- name: Clone Repository.
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}

- name: Read Changelog and validate.
uses: mindsers/[email protected]
Expand All @@ -70,6 +91,8 @@ jobs:
sdk: ["3.16.9", ""]
steps:
- uses: actions/checkout@v4
with:
token: ${{ needs.test.outputs.token }}

- uses: subosito/flutter-action@v2
with:
Expand All @@ -91,6 +114,7 @@ jobs:
name: app-profile.aab
path: example/build/app/outputs/bundle/profile/
retention-days: 3
token: ${{ needs.test.outputs.token }}

build-iOS:
name: Build iOS package
Expand All @@ -105,6 +129,8 @@ jobs:
sdk: ["3.16.9", ""]
steps:
- uses: actions/checkout@v4
with:
token: ${{ needs.test.outputs.token }}
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.sdk }}
Expand All @@ -119,3 +145,4 @@ jobs:
name: fdsm-example.app
path: example/build/ios/iphonesimulator
retention-days: 3
token: ${{ needs.test.outputs.token }}

0 comments on commit 0f8ca39

Please sign in to comment.