Skip to content

Commit 0953376

Browse files
authored
feat: use directory workflow from the... (#2485)
...`scripts` repository
1 parent 4aa529c commit 0953376

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

.github/workflows/awesome_workflow.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ jobs:
2727
wget https://raw.githubusercontent.com/TheAlgorithms/scripts/main/filename_formatter.sh
2828
chmod +x filename_formatter.sh
2929
./filename_formatter.sh . .cpp,.hpp
30-
- name: Update DIRECTORY.md
31-
run: |
32-
wget https://raw.githubusercontent.com/TheAlgorithms/scripts/main/build_directory_md.py
33-
python3 build_directory_md.py C-Plus-Plus . .cpp,.hpp,.h > DIRECTORY.md
34-
git commit -m "updating DIRECTORY.md" DIRECTORY.md || true
3530
- name: Get file changes
3631
run: |
3732
git branch
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Directory writer
2+
on:
3+
push:
4+
branches:
5+
- main
6+
schedule:
7+
# ┌───────────── minute (0 - 59)
8+
# │ ┌───────────── hour (0 - 23)
9+
# │ │ ┌───────────── day of the month (1 - 31)
10+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
11+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
12+
# │ │ │ │ │
13+
# │ │ │ │ │
14+
# │ │ │ │ │
15+
# * * * * *
16+
- cron: '0 0 * * 1'
17+
jobs:
18+
build:
19+
if: github.repository == 'TheAlgorithms/C-Plus-Plus' # We only need this to run in our repository.
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
with:
24+
fetch-depth: 0
25+
- name: Build directory
26+
uses: TheAlgorithms/scripts/directory_md@main
27+
with:
28+
language: C-Plus-Plus
29+
working-directory: .
30+
filetypes: .cpp,.hpp,.h
31+
ignored-directories: doc/

0 commit comments

Comments
 (0)