Skip to content

Commit b6e67a0

Browse files
authored
Fixed scheduled build workflow/job trigger conditions (#722)
* Fixed workflow branch triggers, remove rel/weekly leftover from #713 * Enable scheduled workflow variable for sign and release jobs
1 parent 7b098b8 commit b6e67a0

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ name: CI
88
on:
99
# Triggers the workflow on push or pull request events but only for the main branch
1010
push:
11-
branches: [ main, 'rel/weekly' ]
11+
branches: [ main ]
1212
pull_request:
13-
branches: [ main, 'rel/weekly' ]
13+
branches: [ main ]
1414

1515
# Allows you to run this workflow manually from the Actions tab
1616
workflow_dispatch:
@@ -27,6 +27,10 @@ on:
2727
description: 'The end commit of the range to check for incremental builds.'
2828
type: string
2929
required: false
30+
is_scheduled:
31+
description: 'A boolean value that indicates whether this is a scheduled run.'
32+
type: boolean
33+
required: false
3034

3135
env:
3236
DOTNET_VERSION: ${{ '9.0.x' }}
@@ -341,7 +345,7 @@ jobs:
341345

342346
sign:
343347
needs: [package]
344-
if: ${{ startsWith(github.ref, 'refs/heads/rel/') }}
348+
if: ${{ startsWith(github.ref, 'refs/heads/rel/') || inputs.is_scheduled }}
345349
runs-on: windows-latest
346350
permissions:
347351
id-token: write # Required for requesting the JWT
@@ -406,7 +410,7 @@ jobs:
406410
${{ github.workspace }}/packages/**/*.nupkg
407411
408412
release:
409-
if: ${{ startsWith(github.ref, 'refs/heads/rel/') }}
413+
if: ${{ startsWith(github.ref, 'refs/heads/rel/') || inputs.is_scheduled }}
410414
needs: [sign]
411415
environment: nuget-release-gate # This gates this job until manually approved
412416
runs-on: ubuntu-latest

.github/workflows/scheduled-releases.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,5 @@ jobs:
6868
with:
6969
commit_range_start: ${{ needs.tag-weekly-release.outputs.commit_range_start }}
7070
commit_range_end: ${{ needs.tag-weekly-release.outputs.commit_range_end }}
71+
is_scheduled: true
7172
secrets: inherit

0 commit comments

Comments
 (0)