Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/actions/provision-parent-stack/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ inputs:
description: 'Commit message'
required: false
default: ''
skip-refresh:
description: 'Skip Pulumi refresh operation before provisioning'
required: false
default: 'false'

outputs:
stack-name:
Expand Down Expand Up @@ -78,3 +82,4 @@ runs:
GITHUB_REF: ${{ inputs.ref }}
COMMIT_AUTHOR: ${{ inputs.commit-author }}
COMMIT_MESSAGE: ${{ inputs.commit-message }}
SKIP_REFRESH: ${{ inputs.skip-refresh }}
4 changes: 2 additions & 2 deletions pkg/githubactions/actions/operation_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ func (e *Executor) executeProvision(ctx context.Context, config OperationConfig,
StacksDir: ".sc/stacks",
Profile: profile,
Stacks: []string{config.StackName},
SkipRefresh: previewMode,
DetailedDiff: true, // Enable detailed diff for better visibility in GitHub Actions
SkipRefresh: config.SkipRefresh || previewMode, // Use configured skip-refresh or preview mode
DetailedDiff: true, // Enable detailed diff for better visibility in GitHub Actions
}

if previewMode {
Expand Down
7 changes: 4 additions & 3 deletions pkg/githubactions/actions/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ func (e *Executor) ProvisionParentStack(ctx context.Context) error {
// Wrap the provision with signal handling and panic recovery
return e.signalHandler.WithSignalHandling(ctx, opTypeProvision, provisionParams, func(opCtx context.Context) error {
return e.executeOperation(opCtx, OperationConfig{
Type: OperationProvision,
Scope: ScopeParent,
StackName: stackName,
Type: OperationProvision,
Scope: ScopeParent,
StackName: stackName,
SkipRefresh: os.Getenv("SKIP_REFRESH") == "true", // Skip Pulumi refresh if requested
})
})
}
Expand Down
Loading