-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.32 KB
/
workflow.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Update Markdown Performance
on:
push:
paths:
- "**.md"
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Get List of Not Filled Markdown Files
id: getfile
run: |-
echo "" > not_filled_files.txt
while IFS= read -r -d $'\0' file; do
if ! grep -q "### 성능 요약" "$file"; then
echo "$file" >> not_filled_files.txt
fi
done < <(find . -name "*.md" -print0)
- name: Update Performance in Markdown
uses: dltkdgns00/BOJ-action@main
with:
path: not_filled_files.txt
user_id: fkdl4878
language_id: 1001
- name: remove not_filled_files.txt
run: rm not_filled_files.txt
- name: Commit and push changes
run: >-
git config --local user.email
"github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git status
if [[ -n "$(git status --porcelain)" ]]; then
git commit -m "Update performance details"
git push
else
echo "No changes to commit."
fi