Update callable-test.yaml #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2024 Defense Unicorns | ||
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial | ||
name: Callable-Test | ||
on: | ||
workflow_call: | ||
inputs: | ||
runsOn: | ||
default: ubuntu-latest | ||
type: string | ||
upgrade-flavors: | ||
required: true | ||
type: string | ||
flavor: | ||
required: true | ||
type: string | ||
type: | ||
required: true | ||
type: string | ||
reports-path: | ||
type: string | ||
description: The path to test outputs to upload | ||
reports-name: | ||
type: string | ||
description: The name prefix for upload test reports | ||
default: playwright-report | ||
udsCliVersion: | ||
description: The uds-cli version to install | ||
# renovate: datasource=github-tags depName=defenseunicorns/uds-cli versioning=semver | ||
default: 0.17.0 | ||
type: string | ||
# Permissions for the GITHUB_TOKEN used by the workflow. | ||
permissions: | ||
contents: read # Allows reading the content of the repository. | ||
packages: read # Allows reading the content of the repository's packages. | ||
id-token: write | ||
jobs: | ||
run: | ||
runs-on: ${{ inputs.runsOn }} | ||
timeout-minutes: 20 | ||
if: contains(inputs.upgrade-flavors, inputs.flavor) || inputs.type == 'install' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install UDS CLI | ||
uses: defenseunicorns/setup-uds@b987a32bac3baeb67bfb08f5e1544e2f9076ee8a # v1.0.0 | ||
with: | ||
version: v${{ inputs.udsCliVersion }} | ||
- name: Debug runsOn value | ||
run: echo "runsOn: ${{ inputs.runsOn }}" | ||
- name: Clean Runner | ||
# If we are on ubuntu-latest we should try to clean the disk since it is the thing that is most limiting | ||
if: ${{ inputs.runsOn == 'ubuntu-latest' }} | ||
run: uds run actions:clean-gh-runner | ||
shell: bash | ||
- name: Environment setup | ||
run: | | ||
uds run actions:setup-environment \ | ||
--set REGISTRY1_USERNAME="${{ secrets.IRON_BANK_ROBOT_USERNAME }}" \ | ||
--set REGISTRY1_PASSWORD="${{ secrets.IRON_BANK_ROBOT_PASSWORD }}" \ | ||
--set GH_TOKEN="${{ secrets.GITHUB_TOKEN }}" \ | ||
--set CHAINGUARD_IDENTITY="${{ secrets.CHAINGUARD_IDENTITY }}" | ||
shell: bash | ||
- name: Test | ||
run: uds run actions:test-deploy --set FLAVOR="${{ inputs.flavor }}" --set TYPE="${{ inputs.type }}" | ||
shell: bash | ||
- name: UDS Badge Verification | ||
run: uds run actions:verify-badge | ||
shell: bash | ||
- name: Debug Output | ||
if: ${{ always() }} | ||
run: uds run actions:debug-output | ||
shell: bash | ||
- name: Save logs | ||
if: ${{ always() }} | ||
run: uds run actions:save-logs | ||
shell: bash | ||
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | ||
if: ${{ always() }} | ||
with: | ||
name: debug-log-${{ inputs.type }}-${{ inputs.flavor }}-${{ github.run_id }}-${{ github.run_attempt }}-${{ runner.arch }} | ||
path: | | ||
/tmp/zarf-*.log | ||
/tmp/uds-*.log | ||
/tmp/maru-*.log | ||
/tmp/debug-*.log | ||
/tmp/uds-containerd-logs | ||
/tmp/k3d-uds-*.log | ||
oscal-assessment-results.yaml | ||
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | ||
if: ${{ always() && inputs.reports-path != '' }} | ||
with: | ||
name: ${{ inputs.reports-name }}-${{ inputs.type }}-${{ inputs.flavor }}-${{ github.run_id }}-${{ github.run_attempt }}-${{ runner.arch }} | ||
path: ${{ inputs.reports-path }} | ||
retention-days: 30 |