-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(add-to-project): Add project URL for local triggers
- Loading branch information
Showing
1 changed file
with
9 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,12 +17,20 @@ on: | |
types: | ||
- opened | ||
|
||
env: | ||
# We use this workflow locally for hugrverse-actions issues. | ||
# This variable detects whether we are running the workflow locally or via an external workflow_call. | ||
# | ||
# Github's terrible version of a 'ternary operator' | ||
# https://github.com/actions/runner/issues/409#issuecomment-752775072 | ||
PROJECT_URL: ${{ github.repository == 'CQCL/hugrverse-actions' && 'https://github.com/orgs/CQCL-DEV/projects/10' || github.event.inputs.project-url }} | ||
|
||
jobs: | ||
add-to-project: | ||
name: Add issue to project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
project-url: ${{ github.event.inputs.project-url }} | ||
project-url: ${{ env.PROJECT_URL }} | ||
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} |