Skip to content

another fix attempt #97

another fix attempt

another fix attempt #97

name: Docker Image Publish Matrix (All)
on:
workflow_dispatch:
workflow_call:
push:
branches:
- master
- develop
tags:
- tc_nightly*
- tc_v*.*.*
pull_request:
branches: [ "master", "develop" ]
jobs:
generate-workflows-list:
runs-on: ubuntu-latest
outputs:
matrix_json: ${{ steps.discover_workflows.outputs.matrix_json }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Discover Workflows
id: discover_workflows
run: |
# Find all YAML files in the .github/workflows directory that start with "publish_docker_matrix_"
workflows=$(find .github/workflows -name 'publish_docker_matrix_*.yml' -exec basename {} \;)
echo "Found workflows: $workflows"
# Convert to JSON array
matrix_json=$(echo "$workflows" | tr ' ' '\n' | sed 's/^/"/;s/$/"/' | paste -sd, - | sed 's/^/[ /;s/$/ ]/')
echo "matrix_json=$matrix_json" >> $GITHUB_ENV
trigger-workflows:
runs-on: ubuntu-latest
strategy:
matrix:
workflow: ${{ fromJson(needs.generate-workflows-list.outputs.matrix_json) }}
steps:
- name: Trigger Workflow
uses: ./.github/workflows/${{ matrix.workflow }}

Check failure on line 44 in .github/workflows/publish_docker_matrix.yml

View workflow run for this annotation

GitHub Actions / Docker Image Publish Matrix (All)

Invalid workflow file

The workflow is not valid. .github/workflows/publish_docker_matrix.yml (Line: 44, Col: 15): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.workflow .github/workflows/publish_docker_matrix.yml (Line: 47, Col: 9): Unexpected value 'secrets'
with:
branch: ${{ github.ref_name }} # Passing the current branch name
secrets: inherit # Inherit secrets from the calling workflow