Skip to content

Add version anchors to README examples #20

Add version anchors to README examples

Add version anchors to README examples #20

Workflow file for this run

on:
push:
paths:
- '.github/workflows/test.yaml'
- 'dist/main.js'
- 'fixtures/**'
jobs:
main:
runs-on: ubuntu-latest
outputs:
matches: ${{ steps.for-each-4.outputs.matches }}
steps:
- uses: actions/checkout@v4
- name: Run colpal/actions-for-each
id: for-each-1
uses: ./
with:
patterns: 'fixtures/*'
- if: steps.for-each-1.outputs.matches != '["fixtures/function-a/","fixtures/function-b/","fixtures/function-c/","fixtures/run-a/","fixtures/run-b/"]'
run: exit 1
- name: Run colpal/actions-for-each
id: for-each-2
uses: ./
with:
patterns: |
fixtures/*
!fixtures/*-b
- if: steps.for-each-2.outputs.matches != '["fixtures/function-a/","fixtures/function-c/","fixtures/run-a/"]'
run: exit 1
- name: Run colpal/actions-for-each
id: for-each-3
uses: ./
with:
patterns: |
fixtures/**/file.txt
!fixtures/function-*/**
- if: steps.for-each-3.outputs.matches != '["fixtures/run-a/file.txt","fixtures/run-b/file.txt"]'
run: exit 1
- name: Run colpal/actions-for-each
id: for-each-4
uses: ./
with:
patterns: 'fixtures/run-*'
parallel:
needs: main
runs-on: ubuntu-latest
strategy:
matrix:
path: ${{ fromJSON(needs.main.outputs.matches) }}
include:
- path: fixtures/run-a/
value: 4
- path: fixtures/run-b/
value: 5
steps:
- uses: actions/checkout@v4
- run: test "$VALUE" = "$(cat $FILE)"
env:
VALUE: ${{ matrix.value }}
FILE: ${{ matrix.path }}file.txt