Update README.md #23
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
name: Large Matrix Workflow | |
on: | |
workflow_dispatch: | |
inputs: | |
print_count: | |
description: 'Number of times to print (1000 or 3000)' | |
required: true | |
default: '1000' # Default value as a string | |
pull_request: | |
jobs: | |
generate-jobs: | |
name: Generate Jobs | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
job_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@int-sh | |
with: | |
egress-policy: audit | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Make a curl request | |
run: curl https://google.com | |
- name: Print large amount of text | |
run: | | |
echo "This is job number ${{ matrix.job_id }}" | |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
print_count=1000 | |
else | |
print_count="${{ github.event.inputs.print_count }}" | |
fi | |
for i in $(seq 1 "$print_count"); do | |
echo "Logging text line $i for job ${{ matrix.job_id }}: $(head -c 100 < /dev/urandom | tr -dc 'A-Za-z0-9');" | |
done |