Skip to content

add 2024_08_23.md

add 2024_08_23.md #45

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: Debug event payload
run: |
echo "Event payload:"
cat $GITHUB_EVENT_PATH
- name: Get changes
run: |
FILES=$(git diff --name-only -r HEAD^1 HEAD)
cat $FILES
- 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