-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.58 KB
/
pr-issues-project.yaml
File metadata and controls
46 lines (41 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
# GitHub Actions workflow to automatically push PRs and issues to the Schrödinger's Stack project board.
#
# IMPORTANT: This workflow is called by other workflows in the organization's repositories and it is centralized here
# in order to be easily maintained. Because of this, please make sure you're not introducing any breaking changes when
# modifying this workflow.
name: "pr-issues-project"
on:
# Run when called by other workflows.
workflow_call:
secrets:
SCHTACK_MAINTAINER_APP_ID:
description: "App ID of the GitHub app with permissions to add issues and PRs to the Schrödinger's Stack project board"
required: true
SCHTACK_MAINTAINER_PRIVATE_KEY:
description: "PEM private key of the GitHub app with permissions to add issues and PRs to the Schrödinger's Stack project board"
required: true
# Run when a new issue or PR is opened or reopened in this repository.
issues:
types:
- opened
- reopened
pull_request:
types:
- opened
- reopened
jobs:
pr-issues-project:
runs-on: ubuntu-latest
steps:
- name: Generate authentication token from GitHub App
id: app_token
uses: actions/create-github-app-token@v3.1.1
with:
app-id: ${{ secrets.SCHTACK_MAINTAINER_APP_ID }}
private-key: ${{ secrets.SCHTACK_MAINTAINER_PRIVATE_KEY }}
- name: Add PR or issue to the project board
uses: actions/add-to-project@v1.0.2
with:
project-url: https://github.com/orgs/schrodingers-stack/projects/1/
github-token: ${{ steps.app_token.outputs.token }}