Skip to content

Commit f6f416e

Browse files
Generated commit to update templated files based on rev a85311a in stackabletech/operator-templating repo. (#823)
Triggered by: Manual run triggered by: xeniape with message [Add schedule and workflow_dispatch event triggers to build workflow]
1 parent 5d7afc7 commit f6f416e

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
- '[0-9][0-9].[0-9]+.[0-9]+'
1717
pull_request:
1818
merge_group:
19+
schedule:
20+
# Run every Saturday morning: https://crontab.guru/#15_3_*_*_6
21+
- cron: '15 3 * * 6'
22+
workflow_dispatch:
1923

2024
env:
2125
CARGO_TERM_COLOR: always
@@ -64,11 +68,11 @@ jobs:
6468
# repository: test
6569
#
6670
# - all tagged releases land in stable:
67-
# condition: github.event_name == 'create' & github.ref.startswith('refs/tags/')
71+
# condition: github.event_name == 'push' & github.ref.startswith('refs/tags/')
6872
# repository: stable
6973
#
70-
# - all pushes to main (i.e. PR-merges) land in dev:
71-
# condition: github.event_name == 'push' & github.ref == 'refs/heads/main'
74+
# - all pushes to main (i.e. PR-merges) and all scheduled/manual workflow runs on main land in dev:
75+
# condition: ( github.event_name == 'push' | github.event_name == 'schedule' | github.event_name == 'workflow_dispatch' ) & github.ref == 'refs/heads/main'
7276
# repository: dev
7377
#
7478
# Any other scenarios (e.g. when a branch is created/pushed) will cause the publish step to be skipped, most commonly this is expected to happen for the
@@ -87,10 +91,10 @@ jobs:
8791
if [[ $TRIGGER == "pull_request" ]]; then
8892
echo "exporting test as target helm repo: ${{ env.TEST_REPO_HELM_URL }}"
8993
echo "helm_repo=${{ env.TEST_REPO_HELM_URL }}" >> $GITHUB_OUTPUT
90-
elif [[ $TRIGGER == "push" && $GITHUB_REF == "refs/heads/main" ]]; then
94+
elif [[ ( $TRIGGER == "push" || $TRIGGER == "schedule" || $TRIGGER == "workflow_dispatch" ) && $GITHUB_REF == "refs/heads/main" ]]; then
9195
echo "exporting dev as target helm repo: ${{ env.DEV_REPO_HELM_URL }}"
9296
echo "helm_repo=${{ env.DEV_REPO_HELM_URL }}" >> $GITHUB_OUTPUT
93-
elif [[ ( $TRIGGER == "create" || $TRIGGER == "push" ) && $GITHUB_REF == refs/tags/* ]]; then
97+
elif [[ $TRIGGER == "push" && $GITHUB_REF == refs/tags/* ]]; then
9498
echo "exporting stable as target helm repo: ${{ env.STABLE_REPO_HELM_URL }}"
9599
echo "helm_repo=${{ env.STABLE_REPO_HELM_URL }}" >> $GITHUB_OUTPUT
96100
else

0 commit comments

Comments
 (0)