Skip to content

Fix artifact name

Fix artifact name #3

name: OpenShift Certification

Check failure on line 1 in .github/workflows/openshift-certification.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/openshift-certification.yml

Invalid workflow file

(Line: 50, Col: 15): Unexpected symbol: '}-:${{'. Located at position 14 within expression: inputs.image }-:${{ inputs.image_version
on:
workflow_call:
inputs:
runner:
required: false
type: string
default: 'ubuntu-24.04'
image:
required: true
type: string
image_version:
required: true
type: string
tag:
required: false
type: string
default: ''
dry_run:
required: false
type: boolean
default: false
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
preflight:
runs-on: ${{ inputs.runner }}
steps:
- name: Checkout Repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ (inputs.tag != '' && !inputs.dry_run ) && format('refs/tags/v{0}', inputs.tag) || github.ref }}
- name: Download preflight binary
run: |
curl -LO https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/latest/download/preflight-linux-amd64
chmod +x preflight-linux-amd64
sudo mv preflight-linux-amd64 /usr/local/bin/preflight
- name: Download Artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: ${{ inputs.image }-:${{ inputs.image_version }}
path: ${{ github.workspace }}/dist
- name: List files after artifact download
run: ls -l ${{ github.workspace }}/dist
# - name: Load image into Docker
# run: |
# docker load -i ${{ inputs.image }}-${{ inputs.image_version }}.tar
# - name: Retag image for preflight
# run: |
# loaded_tag="localhost:5000/nginx-gateway-fabric/${{ inputs.image }}:${{ inputs.image_version }}"
# preflight_tag="${{ inputs.image }}:ubi"
# docker tag "$loaded_tag" "$preflight_tag"
# - name: Run preflight
# env:
# PYXIS_API_TOKEN: ${{ secrets.PYXIS_API_TOKEN }}
# run: preflight check container ${{ inputs.image }}:ubi > preflight-result.json
# - name: Check preflight results
# run: |
# failed_count=$(jq '.results.failed | length' preflight-result.json)
# if [ "$failed_count" -ne 0 ]; then
# echo "Preflight checks failed: $failed_count failed checks"
# echo "Results for preflight-result.json:"
# jq '.results.failed' preflight-result.json
# exit 1
# fi