Skip to content

Commit

Permalink
ci(add-to-project): Add project URL for local triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Jul 26, 2024
1 parent c2e6819 commit eedc386
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit eedc386

Please sign in to comment.