Skip to content

Commit 01c4264

Browse files
committed
simplifies conditional expressions
simplifies conditional expressions in GitHub workflow files for better readability.
1 parent fff9b55 commit 01c4264

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

.github/workflows/_unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ jobs:
4242
-
4343
name: Test Summary
4444
uses: test-summary/[email protected]
45-
if: ${{ always() && matrix.dotnet_version == '10.0' }}
45+
if: always() && matrix.dotnet_version == '10.0'
4646
with:
4747
paths: artifacts/test-results/*.results.xml

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
- '!docs/**'
2222
merge_group:
2323
types: [checks_requested]
24-
24+
2525
repository_dispatch:
2626
types: [ ci-release ]
2727

@@ -43,7 +43,7 @@ jobs:
4343
prepare:
4444
name: Prepare
4545
uses: ./.github/workflows/_prepare.yml
46-
46+
4747
build:
4848
name: Build & Package
4949
needs: [ prepare ]
@@ -135,11 +135,11 @@ jobs:
135135
uses: ./.github/actions/artifacts-restore
136136
-
137137
name: Attetstation
138-
if: ${{ github.event_name == 'repository_dispatch' }}
138+
if: github.event_name == 'repository_dispatch'
139139
uses: ./.github/actions/artifacts-attest
140140
-
141141
name: DockerHub Publish Readme
142-
if: ${{ github.event_name == 'repository_dispatch' }}
142+
if: github.event_name == 'repository_dispatch'
143143
shell: pwsh
144144
run: dotnet run/docker.dll --target=DockerHubReadmePublish
145145
env:
@@ -151,10 +151,10 @@ jobs:
151151
run: dotnet run/release.dll --target=PublishRelease
152152
-
153153
name: '[Publish Release]'
154-
if: ${{ github.event_name == 'repository_dispatch' }}
154+
if: github.event_name == 'repository_dispatch'
155155
uses: peter-evans/repository-dispatch@v4
156156
with:
157157
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
158158
repository: ${{ github.repository }}
159159
event-type: publish-release
160-
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ github.event.client_payload.tag }}"}'
160+
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ github.event.client_payload.tag }}"}'

.github/workflows/docs.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,6 @@ jobs:
142142
run: dotnet run/docs.dll --target=GenerateSchemas
143143
-
144144
name: '[Publish Documentation]'
145-
if: ${{ github.event_name == 'repository_dispatch' }}
146-
shell: pwsh
147-
run: dotnet run/docs.dll --target=PublishDocs
148-
-
149-
name: '[Publish Documentation]'
150-
if: ${{ github.event_name == 'workflow_dispatch' }}
145+
if: github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch'
151146
shell: pwsh
152147
run: dotnet run/docs.dll --target=PublishDocs --force

0 commit comments

Comments
 (0)