Skip to content

Commit

Permalink
feat: use directory workflow from the scripts repository (#1278)
Browse files Browse the repository at this point in the history
* feat: use directory workflow from the...

...`scripts` repository.

* fix: `on` event

* chore: run directory workflow daily
  • Loading branch information
Panquesito7 committed Sep 27, 2023
1 parent db3d6e2 commit e5dad3f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/awesome_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ jobs:
uses: TheAlgorithms/scripts/formatter@main
with:
filetypes: .c,.h
- name: Update DIRECTORY.md
run: |
wget https://raw.githubusercontent.com/TheAlgorithms/scripts/main/build_directory_md.py
python3 build_directory_md.py C . .c,.h leetcode/ > DIRECTORY.md
git commit -m "updating DIRECTORY.md" DIRECTORY.md || true
- name: Get file changes
run: |
git branch
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/directory_writer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Directory writer
on:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
if: github.repository == 'TheAlgorithms/C' # We only need this to run in our repository.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build directory
uses: TheAlgorithms/scripts/directory_md@main
with:
language: C
working-directory: .
filetypes: .c,.h
ignored-directories: leetcode/,scripts/

0 comments on commit e5dad3f

Please sign in to comment.