-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (30 loc) · 953 Bytes
/
pilot.yml
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
name: Doc-Pilot
on: [push, pull_request, workflow_dispatch, workflow_call]
permissions:
contents: write
jobs:
add-docstring:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: List changed files
id: changes
run: |
$changed_files= git diff --name-only HEAD^ HEAD
)
echo "::set-output name=files::$changed_files"
shell: bash
- name: Display changed files
run: |
echo "Changed files:"
echo "${{ steps.changes.outputs.files }}"
shell: bash
- name: Get new file contents
id: file_contents
run: |
changed_files="${{ steps.changes.outputs.files }}"
for file in $changed_files; do
echo "Contents of $file:"
cat $file
done
shell: bash