Skip to content

Commit

Permalink
fix(add-to-project): Use input github token (#11)
Browse files Browse the repository at this point in the history
Reverse case to #10. We were using the local secret instead of reading
from the inputs to the workflow -.-'

This should be the last fix...
  • Loading branch information
aborgna-q authored Aug 19, 2024
1 parent 24257ff commit 9be7507
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ env:
# 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' || inputs.project-url }}
# We use a ADD_TO_PROJECT_PAT secret locally.
GITHUB_TOKEN: ${{ secrets.GITHUB_PAT || secrets.ADD_TO_PROJECT_PAT }}

jobs:
add-to-project:
Expand All @@ -35,7 +37,12 @@ jobs:
run: |
echo "The project-url input is required."
exit 1
- name: Fail if GITHUB_PAT is not set
if: env.GITHUB_TOKEN == ''
run: |
echo "The GITHUB_PAT input is required."
exit 1
- uses: actions/[email protected]
with:
project-url: ${{ env.PROJECT_URL }}
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
github-token: ${{ env.GITHUB_TOKEN }}

0 comments on commit 9be7507

Please sign in to comment.