Skip to content

refactor images.yml into reusable workflow #96

refactor images.yml into reusable workflow

refactor images.yml into reusable workflow #96

Workflow file for this run

name: images
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
packages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
config:
name: Read config
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.kernel.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Read versions.json
id: kernel
run: |
echo "matrix<<EOF"
cat versions.json
echo -e "\nEOF"
build-and-push:
name: Build And Push
needs: config
uses: ./.github/workflows/build-and-push.yml
strategy:
matrix: ${{ fromJSON(needs.config.outputs.matrix) }}
with:
kernel_version: ${{ matrix.version }}
build_selftests: ${{ matrix.tag != "" }}

Check failure on line 45 in .github/workflows/images.yml

View workflow run for this annotation

GitHub Actions / images

Invalid workflow file

The workflow is not valid. .github/workflows/images.yml (Line: 45, Col: 24): Unexpected symbol: '""'. Located at position 15 within expression: matrix.tag != "" .github/workflows/images.yml (Line: 46, Col: 20): Unexpected symbol: '""'. Located at position 15 within expression: matrix.tag != ""
build_arm64: ${{ matrix.tag != "" }}
static_tag1: ${{ matrix.tag }}
results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Results
needs:
- build-and-push
steps:
- run: exit 1
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}