Skip to content

Commit

Permalink
🚧Update sync workflow (#163)
Browse files Browse the repository at this point in the history
* Start work for issue 162

* ci: update infra version and update workflow inputs

* ci: update event data

* ci: update outdated workflow

* ci: update infra version and add secret

* ci: update infra version

* ci: add single line to end of file
  • Loading branch information
kselena authored Nov 13, 2023
1 parent 10c00ad commit fb6ee6f
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 13 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/add-new-issue-to-project.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,38 @@
name: 🤖Add New Issue To Project


defaults:
run:
shell: pwsh


on:
issues:
types: opened
pull_request_target:
types: opened
branches: [main, preview]
branches: [main, preview, renovate/*]


jobs:
get_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: |
"item-number=${{ github.event.pull_request.number }}" >> $env:GITHUB_OUTPUT;
add_new_issue_to_project:
name: Add New Issue
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
needs: get_item_number
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
with:
org-name: "${{ vars.ORGANIZATION_NAME }}"
org-project-name: "${{ vars.ORG_PROJECT_NAME }}"
project-name: "${{ vars.PROJECT_NAME }}"
repo-name: "${{ vars.PROJECT_NAME }}"
item-number: ${{ needs.get_item_number.outputs.item-number }}
secrets:
cicd-pat: ${{ secrets.CICD_TOKEN }}
6 changes: 5 additions & 1 deletion .github/workflows/build-status-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ on:
jobs:
build_project:
name: ${{ vars.PROJECT_NAME }} Build Status Check
uses: KinsonDigital/Infrastructure/.github/workflows/build-csharp-project.yml@v13.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/build-csharp-project.yml@v13.3.0
with:
project-name: ${{ vars.PROJECT_NAME }}
build-config: Debug
net-sdk-version: ${{ vars.NET_SDK_VERSION }}
checkout-ref: ${{ github.event.pull_request.head.ref }}
checkout-repository: ${{ github.event.pull_request.head.repo.full_name }}
secrets:
cicd-pat: ${{ secrets.CICD_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
prepare_release:
name: Prepare ${{ inputs.release-type }} Release Of ${{ vars.PROJECT_NAME }}
needs: print_validate_workflow
uses: KinsonDigital/Infrastructure/.github/workflows/prepare-release.yml@v13.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/prepare-release.yml@v13.3.0
with:
project-name: ${{ vars.PROJECT_NAME }}
release-type: ${{ inputs.release-type }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
perform_release:
name: Performing ${{ inputs.release-type }} Release of ${{ vars.PROJECT_NAME }} (${{ inputs.release-type == 'Production' && 'Release' || 'Debug' }})
needs: determine_release_notes_path
uses: KinsonDigital/Infrastructure/.github/workflows/dotnet-action-release.yml@v13.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/dotnet-action-release.yml@v13.3.0
with:
project-name: "${{ vars.PROJECT_NAME }}"
release-type: "${{ inputs.release-type }}"
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/sync-pr-to-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ on:
jobs:
initial_sync:
name: Start Initial Sync
if: ${{ github.event_name == 'pull_request_target' }}
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
if: |
github.event_name == 'pull_request_target' &&
!startsWith(github.head_ref, 'renovate/')
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
with:
issue-or-pr-number: ${{ github.event.pull_request.number }}
sync-type: initial
Expand All @@ -29,8 +31,11 @@ jobs:

manual_sync:
name: Start Manual Sync
if: ${{ github.event_name == 'issue_comment' && contains(github.event.comment.body, '[run-sync]') }}
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
if: |
github.event_name == 'issue_comment' &&
github.event.issue.pull_request && github.event.issue.pull_request.url != null &&
contains(github.event.comment.body, '[run-sync]')
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
with:
issue-or-pr-number: ${{ github.event.issue.number }}
sync-type: manual
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/unit-test-status-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ on:
jobs:
run_tests:
name: ${{ vars.PROJECT_NAME }} Test Status Check
uses: KinsonDigital/Infrastructure/.github/workflows/run-csharp-tests.yml@v13.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/run-csharp-tests.yml@v13.3.0
with:
project-name: ${{ vars.PROJECT_NAME }}Tests
build-config: Debug
net-sdk-version: ${{ vars.NET_SDK_VERSION }}
checkout-ref: ${{ github.event.pull_request.head.ref }}
checkout-repository: ${{ github.event.pull_request.head.repo.full_name }}
secrets:
cicd-pat: ${{ secrets.CICD_TOKEN }}

0 comments on commit fb6ee6f

Please sign in to comment.