generated from KinsonDigital/CSharpLibTemplateRepo
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: rename and improve workflow due to v12.0.0
- Loading branch information
1 parent
ce44b2e
commit 34639ee
Showing
2 changed files
with
41 additions
and
22 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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 }} |