feat: expose skip-artifact as workflow input in action.yml

action.yml:
  - Add skip-artifact input (default: 'false').
  - Forward as INPUT_SKIP_ARTIFACT env var to the PS run step.
  - Pass SkipArtifact=true to Invoke-CIJob.ps1 when set.
  - Gate 'Upload artifacts' step on inputs.skip-artifact != 'true'.

Invoke-CIJob.ps1:
  - Restore -SkipArtifact switch; skips Phase 6 and logs 'skipped' event.

Invoke-RemoteBuild.ps1:
  - Restore -SkipArtifact switch; skips packaging inside the guest.
  - Error message updated to mention skip-artifact workflow input.
This commit is contained in:
Simone
2026-05-12 22:05:17 +02:00
parent a6acf1eef7
commit 9007934dca
3 changed files with 38 additions and 8 deletions
+13 -2
View File
@@ -139,6 +139,15 @@ inputs:
required: false
default: 'false'
skip-artifact:
description: >
Set to "true" to skip artifact packaging and collection entirely.
Use for jobs that intentionally produce no output (lint, static analysis,
test-only). When absent (default), the build MUST produce artifact-source
or the job fails.
required: false
default: 'false'
outputs:
artifact-path:
description: >
@@ -174,6 +183,7 @@ runs:
INPUT_REPO_URL: ${{ inputs.repo-url }}
INPUT_EXTRA_GUEST_ENV_JSON: ${{ inputs.extra-guest-env-json }}
INPUT_USE_SHARED_CACHE: ${{ inputs.use-shared-cache }}
INPUT_SKIP_ARTIFACT: ${{ inputs.skip-artifact }}
run: |
#Requires -Version 5.1
Set-StrictMode -Version Latest
@@ -254,9 +264,10 @@ runs:
Configuration = $env:INPUT_CONFIGURATION
}
if ($env:INPUT_SUBMODULES -eq 'true') { $params['Submodules'] = $true }
if ($env:INPUT_SUBMODULES -eq 'true') { $params['Submodules'] = $true }
if ($env:INPUT_USE_GIT_CLONE -eq 'true') { $params['UseGitClone'] = $true }
if ($env:INPUT_USE_SHARED_CACHE -eq 'true') { $params['UseSharedCache'] = $true }
if ($env:INPUT_SKIP_ARTIFACT -eq 'true') { $params['SkipArtifact'] = $true }
if ($resolvedTemplatePath) { $params['TemplatePath'] = $resolvedTemplatePath }
if ($resolvedSnapshotName) { $params['SnapshotName'] = $resolvedSnapshotName }
if ($extraGuestEnv.Count -gt 0) { $params['ExtraGuestEnv'] = $extraGuestEnv }
@@ -270,7 +281,7 @@ runs:
# ── Upload build artifacts on success ─────────────────────────────────────
- name: Upload artifacts
if: success()
if: success() && inputs.skip-artifact != 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ steps.invoke-ci.outputs.artifact-name }}