Add a new fact #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: issue created | |
on: | |
issues: | |
types: [edited, opened] | |
jobs: | |
add_fact: | |
name: add a new fact if appropriate | |
runs-on: ubuntu-latest | |
steps: | |
# Rather than use a personal access token to interact with the project, we | |
# can use this GitHub App. There's an API for exchanging app credentials | |
# for a short-term token, and we use that API here. | |
- name: get token | |
uses: tibdex/github-app-token@v1 | |
id: app_token | |
with: | |
app_id: ${{ secrets.APP_ID }} | |
installation_id: ${{ secrets.APP_INSTALLATION_ID }} | |
private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: npm | |
- run: npm install --production | |
- run: node addFact.js | |
working-directory: ./.github/workflows | |
env: | |
GITHUB_TOKEN: ${{ steps.app_token.outputs.token }} |