Skip to content

Commit 4c198b9

Browse files
committed
🔧 (main.yml): add GitHub context variables and temporarily disable build jobs
Add GitHub context variables to the workflow to enhance the ability to access repository and reference information dynamically. This change is crucial for workflows that need to differentiate between push and pull request events and access specific repository details accordingly. Temporarily disable the "Build, Test, Sonar Cloud Analysis, & Package" and "Build Documentation output" jobs by setting their conditions to false. This is likely done to prevent these jobs from running during a specific phase of development or testing, possibly to save resources or focus on other parts of the workflow.
1 parent 6ea8a74 commit 4c198b9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎.github/workflows/main.yml‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,14 @@ jobs:
236236
- HasChanged_src: ${{needs.Setup.outputs.HasChanged_src}}
237237
- HasChanged_docs: ${{needs.Setup.outputs.HasChanged_docs}}
238238
- HasChanged_automation: ${{needs.Setup.outputs.HasChanged_automation}}
239+
### Github Bits
240+
- repository: ${{ github.event_name == 'push' && github.repository || github.event.pull_request.head.repo.full_name }}
241+
- ref: ${{ github.event_name == 'push' && github.ref || github.event.pull_request.head.ref }}
242+
- github.repository: ${{github.repository}}
243+
- github.event.pull_request.head.repo.full_name: ${{github.event.pull_request.head.repo.full_name}}
244+
- github.ref: ${{github.ref}}
245+
- github.event.pull_request.head.ref: ${{github.event.pull_request.head.ref}}
246+
239247
"@
240248
echo $markdown >> $Env:GITHUB_STEP_SUMMARY
241249
- name: "Show Release Description"
@@ -256,7 +264,7 @@ jobs:
256264
name: "Build, Test, Sonar Cloud Analysis, & Package"
257265
runs-on: windows-latest
258266
needs: Setup
259-
if: ${{ success() }}
267+
if: false # ${{ success() }}
260268
env:
261269
solution: '**/*.sln'
262270
buildPlatform: 'Any CPU'
@@ -352,7 +360,7 @@ jobs:
352360
BuildDocs:
353361
name: "Build Documentation output"
354362
runs-on: ubuntu-latest
355-
if: ${{ success() }}
363+
if: false # ${{ success() }}
356364
needs: [Setup]
357365
env:
358366
GitVersion_SemVer: ${{ needs.Setup.outputs.GitVersion_SemVer }}

0 commit comments

Comments
 (0)