Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚧Adjust workflow trigger #161

Merged
merged 6 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/add-new-issue-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ name: 🤖Add New Issue To Project
on:
issues:
types: opened
pull_request:
pull_request_target:
types: opened
branches: [main, preview]


jobs:
add_new_issue_to_project:
name: Add New Issue
uses: KinsonDigital/Infrastructure/.github/workflows/add-issue-to-project.yml@v11.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/add-issue-to-project.yml@v13.0.0
with:
org-name: "${{ vars.ORGANIZATION_NAME }}"
org-project-name: "${{ vars.ORG_PROJECT_NAME }}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-status-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ run-name: ✅Build Status Check (${{ github.base_ref }} branch)


on:
pull_request:
pull_request_target:
branches: [main, preview]


jobs:
build_project:
name: ${{ vars.PROJECT_NAME }} Build Status Check
uses: KinsonDigital/Infrastructure/.github/workflows/build-csharp-project.yml@v11.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/build-csharp-project.yml@v13.0.0
with:
project-name: ${{ vars.PROJECT_NAME }}
build-config: Debug
Expand Down
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@v11.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/prepare-release.yml@v13.0.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@v11.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/dotnet-action-release.yml@v13.0.0
with:
project-name: "${{ vars.PROJECT_NAME }}"
release-type: "${{ inputs.release-type }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set Up Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
deno-version: ${{ vars.DENO_VERSION }}

- name: Run Sync Bot (Issue Change)
run: |
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/sync-issue-to-pr.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/sync-pr-to-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 🔄️Sync PR To Issue


defaults:
run:
shell: pwsh


on:
pull_request_target:
types: opened
issue_comment: # This event is triggered when creating issue and pr comments
types: created


jobs:
initial_sync:
name: Start Initial Sync
if: ${{ github.event_name == 'pull_request_target' }}
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
with:
issue-or-pr-number: ${{ github.event.pull_request.number }}
sync-type: initial
requested-by: ${{ github.event.sender.login }}
branch: ${{ github.event.pull_request.head.ref }} # Input not required for initial sync
secrets:
cicd-pat: ${{ secrets.CICD_TOKEN }}


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]
with:
issue-or-pr-number: ${{ github.event.issue.number }}
sync-type: manual
requested-by: "validate:${{ github.event.sender.login }}"
secrets:
cicd-pat: ${{ secrets.CICD_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/sync-status-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defaults:


on:
pull_request:
pull_request_target:
branches: [main, preview]


Expand All @@ -20,7 +20,7 @@ jobs:
- name: Set Up Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
deno-version: ${{ vars.DENO_VERSION }}

- name: Run Sync Status Check
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-test-status-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ run-name: ✅Unit Testing Status Check (${{ github.base_ref }} branch)


on:
pull_request:
pull_request_target:
branches: [main, preview]


jobs:
run_tests:
name: ${{ vars.PROJECT_NAME }} Test Status Check
uses: KinsonDigital/Infrastructure/.github/workflows/run-csharp-tests.yml@v11.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/run-csharp-tests.yml@v13.0.0
with:
project-name: ${{ vars.PROJECT_NAME }}Tests
build-config: Debug
Expand Down