Update UnitarySystem set point control #490
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: 'Create Project Card for a New PR' | |
on: | |
pull_request_target: | |
# So we need this action purely to add PRs to a project. Once in the project, | |
# there are built-in project workflows for assigning new items to a column, and | |
# moving closing and reopening items within a project. I think we just need to handle | |
# the opened event, and we'll be good to go. | |
types: [ opened ] | |
env: | |
# this token must have typical repo write access plus full :project access | |
# Create this token with the correct permissions and add it as a repo secret | |
# It would be preferable to just use the GITHUB_TOKEN that Actions generates for a run, | |
# but I can't get the right projects (v2) write access to make it work. Eventually | |
# just use that, set permissions here, and delete the token. | |
GH_TOKEN: ${{ secrets.ADD_TO_PROJECT_TOKEN }} | |
jobs: | |
create-card: | |
runs-on: ubuntu-latest | |
steps: | |
# check out the repo to get the script downloaded | |
- uses: actions/checkout@v4 | |
# gets the current PR and stores it in a variable | |
- uses: jwalton/gh-find-current-pr@v1 | |
id: findPr | |
# adds the variable to the environment so that we can use it in the next step | |
- run: echo "PR=${{ steps.findPr.outputs.pr }}" >> $GITHUB_ENV | |
# interact with the GitHub API and manipulate the Project | |
# we should also probably pass the project id as an env variable / argument | |
- run: bash scripts/dev/add_to_project.sh ${{ env.PR }} |