Skip to content

run_jobs

run_jobs #2

Workflow file for this run

name: DJW
on:
repository_dispatch:
types: [run_jobs]
jobs:
setup:
runs-on: ubuntu-latest
outputs:
job_count: ${{ steps.get-job-count.outputs.count }}
steps:
- name: Get job count
id: get-job-count
run: echo "count=${{ github.event.client_payload.job_count }}" >> $GITHUB_OUTPUT
dynamic_job:
needs: setup
runs-on: ubuntu-latest
strategy:
matrix:
job_number: ${{ fromJson(format('[{0}]', join(range(needs.setup.outputs.job_count | int), ','))) }}

Check failure on line 22 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / DJW

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml (Line: 22, Col: 21): Unrecognized function: 'range'. Located at position 31 within expression: fromJson(format('[{0}]', join(range(needs.setup.outputs.job_count | int), ','))) .github/workflows/test.yml (Line: 22, Col: 21): Unexpected value '${{ fromJson(format('[{0}]', join(range(needs.setup.outputs.job_count | int), ','))) }}'
steps:
- name: Run dynamic job
run: |
echo "Running job number ${{ matrix.job_number }}"
# Add your job logic here