Skip to content

Commit 95b9a26

Browse files
committed
Back out all build changes
1 parent 98d858c commit 95b9a26

File tree

1 file changed

+3
-38
lines changed

1 file changed

+3
-38
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
branches: ["main"]
1010
tags-ignore: ["v*-*"]
1111
pull_request_target:
12-
types: [opened, synchronize, labeled]
1312
branches: ["main"]
1413
workflow_dispatch:
1514
inputs:
@@ -35,7 +34,7 @@ jobs:
3534
if: ${{ (github.event_name == 'push') ||
3635
(github.event_name == 'workflow_dispatch') ||
3736
(github.event_name == 'pull_request_target' &&
38-
(github.event.pull_request.head.repo.full_name == github.repository || contains(github.event.pull_request.labels.*.name, 'safe-to-build')))
37+
(github.event.pull_request.head.repo.full_name == github.repository || contains(github.event.pull_request.labels.*.name, 'safe')))
3938
}}
4039
runs-on: ubuntu-latest
4140
outputs:
@@ -60,22 +59,9 @@ jobs:
6059
nkdAgility_RunRelease: ${{ steps.nkdagility.outputs.RunRelease }}
6160
nkdAgility_AzureSitesEnvironment: ${{ steps.nkdagility.outputs.AzureSitesEnvironment }}
6261
steps:
63-
- uses: actions/create-github-app-token@v1
64-
id: app-token
65-
with:
66-
app-id: ${{ secrets.NKDAGILITY_BOT_APP_ID }}
67-
private-key: ${{ secrets.NKDAGILITY_BOT_CLIENTSECRET }}
68-
- name: Remove "safe" label from PR
69-
if: ${{ github.event.pull_request.head.repo.full_name != github.repository && contains(github.event.pull_request.labels.*.name, 'safe-to-build' }}
70-
uses: actions-ecosystem/action-remove-labels@v1
71-
with:
72-
token: ${{ steps.app-token.outputs.token }}
73-
labels: safe-to-build
7462
- name: Checkout
7563
uses: actions/checkout@v4
7664
with:
77-
repository: ${{ github.event_name == 'push' && github.repository || github.event.pull_request.head.repo.full_name }}
78-
ref: ${{ github.event_name == 'push' && github.ref || github.event.pull_request.head.ref }}
7965
fetch-depth: 0
8066
- name: Install GitVersion
8167
uses: gittools/actions/gitversion/[email protected]
@@ -87,8 +73,6 @@ jobs:
8773
uses: gittools/actions/gitversion/[email protected]
8874
with:
8975
useConfigFile: true
90-
verbosity: verbose # Set verbosity level to verbose or debug
91-
9276
- uses: dorny/paths-filter@v3
9377
id: filter
9478
with:
@@ -100,12 +84,9 @@ jobs:
10084
automation:
10185
- 'build/**'
10286
- '.github/workflows/**'
103-
10487
- name: "Build NKDAgility Outputs"
10588
shell: pwsh
10689
id: nkdagility
107-
env:
108-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
10990
run: |
11091
# Get Branch Name
11192
Write-Output "::group::Get Branch Name"
@@ -237,18 +218,8 @@ jobs:
237218
- HasChanged_src: ${{needs.Setup.outputs.HasChanged_src}}
238219
- HasChanged_docs: ${{needs.Setup.outputs.HasChanged_docs}}
239220
- HasChanged_automation: ${{needs.Setup.outputs.HasChanged_automation}}
240-
### Github Bits
241-
- repository: ${{ github.event_name == 'push' && github.repository || github.event.pull_request.head.repo.full_name }}
242-
- ref: ${{ github.event_name == 'push' && github.ref || github.event.pull_request.head.ref }}
243-
- github.repository: ${{github.repository}}
244-
- github.event.pull_request.head.repo.full_name: ${{github.event.pull_request.head.repo.full_name}}
245-
- github.ref: ${{github.ref}}
246-
- github.event.pull_request.head.ref: ${{github.event.pull_request.head.ref}}
247-
- github.event.pull_request.head.repo.fork: ${{github.event.pull_request.head.repo.fork}}
248-
249221
"@
250222
echo $markdown >> $Env:GITHUB_STEP_SUMMARY
251-
252223
- name: "Show Release Description"
253224
if: always()
254225
shell: pwsh
@@ -267,7 +238,7 @@ jobs:
267238
name: "Build, Test, Sonar Cloud Analysis, & Package"
268239
runs-on: windows-latest
269240
needs: Setup
270-
if: ${{ !(github.event.pull_request.head.repo.fork && github.ref == 'refs/heads/main') }}
241+
if: ${{ success() }}
271242
env:
272243
solution: '**/*.sln'
273244
buildPlatform: 'Any CPU'
@@ -288,9 +259,6 @@ jobs:
288259
distribution: 'zulu'
289260
- name: Checkout
290261
uses: actions/checkout@v4
291-
with:
292-
repository: ${{ github.event_name == 'push' && github.repository || github.event.pull_request.head.repo.full_name }}
293-
ref: ${{ github.event_name == 'push' && github.ref || github.event.pull_request.head.ref }}
294262
- uses: cschleiden/replace-tokens@v1
295263
with:
296264
files: '["**/StaticVariables.cs"]'
@@ -363,17 +331,14 @@ jobs:
363331
BuildDocs:
364332
name: "Build Documentation output"
365333
runs-on: ubuntu-latest
366-
if: ${{ !(github.event.pull_request.head.repo.fork && github.ref == 'refs/heads/main') }}
334+
if: ${{ success() }}
367335
needs: [Setup]
368336
env:
369337
GitVersion_SemVer: ${{ needs.Setup.outputs.GitVersion_SemVer }}
370338
GitVersion_AssemblySemVer: ${{ needs.Setup.outputs.GitVersion_AssemblySemVer }}
371339
GitVersion_InformationalVersion: ${{ needs.Setup.outputs.GitVersion_InformationalVersion }}
372340
steps:
373341
- uses: actions/checkout@v4
374-
with:
375-
repository: ${{ github.event_name == 'push' && github.repository || github.event.pull_request.head.repo.full_name }}
376-
ref: ${{ github.event_name == 'push' && github.ref || github.event.pull_request.head.ref }}
377342
- name: Setup Ruby
378343
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
379344
with:

0 commit comments

Comments
 (0)