Workflow file for this run
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: Biweekly Dependency Ticket Creation | |
on: | |
push: | |
branches: | |
- "1381-dependency-ticket-automation" | |
jobs: | |
create_issue: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Create GitHub Issue | |
id: create_issue | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
ISSUE_URL=$(gh issue create \ | |
--body-file "./.github/ISSUE_TEMPLATE/notify-dependency-update-template.md" \ | |
--label "Notify" \ | |
--label "QA" \ | |
--label "Tech Debt" \ | |
--title "Regular Update for Dependencies" \ | |
--json url \ | |
-q .url) | |
echo "issue_url=${ISSUE_URL}" >> $GITHUB_ENV | |
- name: Get Issue Number | |
run: | | |
ISSUE_NUMBER=${issue_url##*/} | |
echo "issue_number=${ISSUE_NUMBER}" >> $GITHUB_ENV | |
- name: Move Issue to "To Do" Column in Project | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
# Replace these with your project and column details | |
PROJECT_NUMBER=1417 | |
TODO_COLUMN_ID=$(gh project column list --project "${PROJECT_NUMBER}" --json id,name --jq '.[] | select(.name=="To Do") | .id') | |
# Add the issue to the project column | |
gh project item add --project "${PROJECT_NUMBER}" --content-type "Issue" --content-id "${{ env.issue_number }}" --column-id "${TODO_COLUMN_ID}" |