Add Issue to Central Project #1
This file contains hidden or 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: Add Issue to Central Project | |
| on: | |
| issues: | |
| types: [opened] | |
| workflow_dispatch: # Enables manual trigger | |
| jobs: | |
| add_to_project: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install GitHub CLI | |
| run: | | |
| sudo apt update | |
| sudo apt install gh -y | |
| - name: Authenticate | |
| env: | |
| GH_TOKEN: ${{ secrets.CENTRAL_PROJECT_PAT }} | |
| run: | | |
| echo "${GH_TOKEN}" | gh auth login --with-token | |
| - name: Add issue to Project | |
| env: | |
| PROJECT_NUMBER: 6 # from your URL | |
| run: | | |
| gh project item add --project $PROJECT_NUMBER --content-url "${{ github.event.issue.html_url }}" |