Skip to content

Commit

Permalink
Use GitHub app for authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
jfsoul committed Jun 24, 2022
1 parent 93f0a53 commit 95af6b4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 37 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/scala-steward.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ jobs:
name: scala-steward
runs-on: ubuntu-latest
steps:
# This is necessary to ensure that the most up-to-date version of
# REPOSITORIES.md is used.
- uses: actions/checkout@v2
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: 214238
private_key: ${{ secrets.SCALA_STEWARD_APP_PRIVATE_KEY }}

- name: Execute Scala Steward
uses: scala-steward-org/[email protected]

with:
# A GitHub personal access token tied to a user that will create
# pull requests against your projects to update dependencies. More
# on this under the YAML snippet.
github-token: ${{ secrets.SCALA_STEWARD_GITHUB_TOKEN }}
# A Markdown file with a literal Markdown list of repositories
# Scala Steward should monitor.
repos-file: REPOSITORIES.md
author-email: [email protected]
author-name: Scala Steward
# Use the token generated by the previous step and the
# Guardian Scala Steward GitHub App
github-token: ${{ steps.generate-token.outputs.token }}
# used for listing repositories
github-app-id: 214238
github-app-key: ${{ secrets.SCALA_STEWARD_APP_PRIVATE_KEY }}
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# scala-steward-public-repos
_Configuration for the Guardian's in-house instance of Scala Steward, suitable for PUBLIC Guardian repos_

If you have a **public** Guardian repo you'd like to scan with Scala Steward, **just add the repo to
the list in [REPOSITORIES.md](REPOSITORIES.md)** - this repo (`scala-steward-public-repos`) is public,
If you have a **public** Guardian repo you'd like to scan with Scala Steward, **request to [install the GitHub app](https://github.com/apps/gu-scala-steward-public-repos) on your repository** - 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).

The Scala Steward action in this repository is only setup with an access token for **public**
The Scala Steward action in this repository should only be given access to **public**
GitHub repos. If your repo is **private**, you will want to add it to
https://github.com/guardian/scala-steward-private-repos - note that we pay for
the GitHub Action minutes for scanning running from that repo, because it's private, but it
Expand Down
22 changes: 0 additions & 22 deletions REPOSITORIES.md

This file was deleted.

0 comments on commit 95af6b4

Please sign in to comment.