diff --git a/.github/workflows/public-repos-scala-steward.yml b/.github/workflows/public-repos-scala-steward.yml index d69e0ca..3a4774e 100644 --- a/.github/workflows/public-repos-scala-steward.yml +++ b/.github/workflows/public-repos-scala-steward.yml @@ -11,5 +11,6 @@ jobs: uses: ./.github/workflows/reusable-scala-steward.yml with: app_id: 214238 + app_installation_id: 26822732 secrets: private_key: ${{ secrets.SCALA_STEWARD_APP_PRIVATE_KEY }} diff --git a/.github/workflows/reusable-scala-steward.yml b/.github/workflows/reusable-scala-steward.yml index bfc37df..36982de 100644 --- a/.github/workflows/reusable-scala-steward.yml +++ b/.github/workflows/reusable-scala-steward.yml @@ -6,6 +6,9 @@ on: app_id: required: true type: string + app_installation_id: + required: true + type: string secrets: private_key: required: true @@ -22,19 +25,13 @@ jobs: with: repository: guardian/scala-steward-public-repos path: common-config - - name: Generate token - id: generate-token - uses: tibdex/github-app-token@v1 - with: - app_id: ${{ inputs.app_id }} - private_key: ${{ secrets.private_key }} - name: Execute Scala Steward uses: scala-steward-org/scala-steward-action@v2.54.0 with: - # Use the token generated by the previous step and the - # Guardian Scala Steward GitHub App - github-token: ${{ steps.generate-token.outputs.token }} - repos-file: REPOSITORIES.md + github-app-id: ${{ inputs.app_id }} + github-app-installation-id: ${{ inputs.app_installation_id }} + github-app-key: ${{ secrets.private_key }} + repos-file: REPOSITORIES.md # possibly no longer necessary, thanks to `github-app-*` configuration repo-config: common-config/scala-steward.conf # from checkout of guardian/scala-steward-public-repos diff --git a/README.md b/README.md index 21c3709..d64444c 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,14 @@ instead!_ ## How to add a new *public* repo for scanning by Scala Steward -1. Add your repo to the list in [REPOSITORIES.md](REPOSITORIES.md) -2. Request to [install our GitHub app](https://github.com/apps/gu-scala-steward-public-repos) on your repo +* **Grant [our GitHub app](https://github.com/apps/gu-scala-steward-public-repos) access to your repo** (click + [`Configure`](https://github.com/organizations/guardian/settings/installations/26822732) - you may need + a repo admin to do this) + * You can check if the app is installed on your repo by examining `/settings/installations` + (eg https://github.com/guardian/amigo/settings/installations): + ![image](https://github.com/guardian/scala-steward-public-repos/assets/52038/9b7dc7b7-a6fc-46d6-b313-a4ae97d5d3ad) +* Only add your repo to `REPOSITORIES.md` if you're specifying a non-default branch to update (after + PR [#40](https://github.com/guardian/scala-steward-public-repos/pull/40) this is probably no longer needed). This repo (`scala-steward-public-repos`) is public, so the GitHub Action minutes are [free](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions). diff --git a/REPOSITORIES.md b/REPOSITORIES.md index 4016bba..bc7ecb4 100644 --- a/REPOSITORIES.md +++ b/REPOSITORIES.md @@ -1,36 +1,12 @@ +# Our Scala Steward GitHub Action will run on any repo that our GitHub App is granted access to. +# +# You only need to add your repo to *this* file if you're specifying a non-default branch to update. +# Thanks to https://github.com/guardian/scala-steward-public-repos/pull/40 this is probably no longer necessary! + - guardian/amiable:dependency-updates_1 - guardian/amigo:dependency-updates -- guardian/amiup -- guardian/apps-rendering-api-models -- guardian/discussion-avatar -- guardian/google-search-indexing-observatory -- guardian/grid-feeds -- guardian/gu-who -- guardian/identity-processes -- guardian/invoicing-api - guardian/janus-app:dependency-updates -- guardian/manage-help-content-publisher -- guardian/marley -- guardian/members-data-api -- guardian/membership-common -- guardian/membership-frontend -- guardian/mobile-n10n -- guardian/ophan-geoip-db-refresher -- guardian/ophan-housekeeper -- guardian/pa-football-client -- guardian/payment-failure-comms -- guardian/play-googleauth -- guardian/play-secret-rotation -- guardian/price-migration-engine - guardian/prism:dependency-updates -- guardian/prout -- guardian/repo-genesis - guardian/riff-raff:dependency-updates -- guardian/salesforce-message-handler - guardian/security-hq:dependency-updates - guardian/ssm-scala:dependency-updates -- guardian/support-frontend -- guardian/support-service-lambdas -- guardian/typerighter -- guardian/zuora-6for6-modifier -- guardian/zuora-full-export