Skip to content

Add a new fact

Add a new fact #31

Workflow file for this run

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 }}