Skip to content

add test file for workflow #2

add test file for workflow

add test file for workflow #2

Workflow file for this run

name: Capture Pushed File Path
on:
push:
paths:
- '**/*'
jobs:
capture-path:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up jq
run: sudo apt-get install -y jq
- name: Get pushed file paths
id: get-paths
run: |
FILES=$(jq -r '.commits[].added[], .commits[].modified[]' < "$GITHUB_EVENT_PATH")
echo "FILES=$FILES" >> $GITHUB_ENV
- name: Print file paths
run: echo "Pushed file paths: ${{ env.FILES }}"

Check failure on line 26 in .github/workflows/sample.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/sample.yml

Invalid workflow file

You have an error in your yaml syntax on line 26
- name: Pass file paths to function
run: |
for file in ${{ env.FILES }}; do
echo "Processing file: $file"
# Call your function here, for example:
# ./your-function.sh "$file"
done