-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathworkflow_sample.yml
More file actions
50 lines (43 loc) · 1.21 KB
/
workflow_sample.yml
File metadata and controls
50 lines (43 loc) · 1.21 KB
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
49
50
name: Update Markdown Performance
on:
push:
paths:
- '**.md'
actors:
- 'dltkdgns00'
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: dltkdgns00
language_id: 1001
- 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