Skip to content

Commit

Permalink
add test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
terri1102 committed Jul 26, 2024
1 parent 1e1fde5 commit 55b5b7c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/sample.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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 }}"

- 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

0 comments on commit 55b5b7c

Please sign in to comment.