Skip to content

Commit ce03778

Browse files
committed
dry run test for pipeline
1 parent bb2b498 commit ce03778

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/push-artifacts.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ on:
2222
- "main"
2323
tags:
2424
- '*.*.*'
25+
pull_request:
26+
paths:
27+
- '.github/workflows/push-artifacts.yaml'
28+
- 'operator/**'
2529
workflow_dispatch:
2630
inputs:
2731
dry_run:
@@ -48,9 +52,13 @@ jobs:
4852

4953
- name: Set dry-run mode
5054
run: |
51-
if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then
55+
# Auto-enable dry-run for PRs
56+
if [ "${{ github.event_name }}" = "pull_request" ]; then
5257
echo "DRY_RUN=true" >> $GITHUB_ENV
53-
echo "🔍 Running in DRY-RUN mode - no artifacts will be pushed"
58+
echo "🔍 Running in DRY-RUN mode (pull request) - no artifacts will be pushed"
59+
elif [ "${{ github.event.inputs.dry_run }}" = "true" ]; then
60+
echo "DRY_RUN=true" >> $GITHUB_ENV
61+
echo "🔍 Running in DRY-RUN mode (manual) - no artifacts will be pushed"
5462
else
5563
echo "DRY_RUN=false" >> $GITHUB_ENV
5664
echo "🚀 Running in LIVE mode - artifacts will be pushed"
@@ -71,7 +79,7 @@ jobs:
7179
echo $PACKAGE_VERSION
7280
7381
- name: Extract package version from branch commit
74-
if: startsWith(github.ref, 'refs/heads/') && github.event.inputs.test_version == ''
82+
if: (startsWith(github.ref, 'refs/heads/') || github.event_name == 'pull_request') && github.event.inputs.test_version == ''
7583
run: |
7684
# We add a 'g' prefix to the hash.
7785
# This prevents "all-number" hashes starting with 0 from breaking Helm (invalid semver)

0 commit comments

Comments
 (0)