Skip to content

Commit

Permalink
ci: rename and improve workflow due to v12.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
CalvinWilkinson committed Aug 14, 2023
1 parent ce44b2e commit 34639ee
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 22 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/add-new-issue-to-project.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/add-new-item-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 🤖Add New Issue To Project


on:
issues:
types: opened
pull_request:
types: opened
branches: [main, preview]


jobs:
item_number:
name: Get Item Number
runs-on: ubuntu-latest
outputs:
item-number: ${{ steps.get-item-number.outputs.item-number }}
steps:
- name: Get Item Number
id: get-item-number
run: |
$eventName = "${{ github.event_name }}";
$itemNumber = $eventName -eq "issues" ? "${{ github.event.issue.number }}" : "${{ github.event.pull_request.number }}";
$itemType = $eventName -eq "issues" ? "issue" : "pull request";
Write-Host "::notice::Invoked by $itemType '$itemNumber'";
"item-number=$itemNumber" >> $env:GITHUB_OUTPUT;
add_new_issue_to_project:
name: Add New Issue
needs: item_number
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
with:
org-name: "${{ vars.ORGANIZATION_NAME }}"
org-project-name: "${{ vars.ORG_PROJECT_NAME }}"
repo-name: "${{ vars.PROJECT_NAME }}"
item-number: "${{ needs.item_number.outputs.item-number }}"
secrets:
cicd-pat: ${{ secrets.CICD_TOKEN }}

0 comments on commit 34639ee

Please sign in to comment.