From 73edb148216b28ec507b6a7a4d0f0647f8988142 Mon Sep 17 00:00:00 2001 From: David Leal Date: Wed, 14 Jun 2023 16:23:22 +0000 Subject: [PATCH 1/3] feat: use directory workflow from the... ...`scripts` repository. --- .github/workflows/awesome_workflow.yml | 5 ----- .github/workflows/directory_writer.yml | 31 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/directory_writer.yml diff --git a/.github/workflows/awesome_workflow.yml b/.github/workflows/awesome_workflow.yml index 968aff2d97..c6f670b2fb 100644 --- a/.github/workflows/awesome_workflow.yml +++ b/.github/workflows/awesome_workflow.yml @@ -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 diff --git a/.github/workflows/directory_writer.yml b/.github/workflows/directory_writer.yml new file mode 100644 index 0000000000..361a465e60 --- /dev/null +++ b/.github/workflows/directory_writer.yml @@ -0,0 +1,31 @@ +name: Directory writer +on: + push: + branches: + - main + 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 * * 1' +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/ From 9eda3e67b1a15a5a6a554c9194803eb59a649105 Mon Sep 17 00:00:00 2001 From: David Leal Date: Fri, 23 Jun 2023 13:52:29 -0600 Subject: [PATCH 2/3] fix: `on` event --- .github/workflows/directory_writer.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/directory_writer.yml b/.github/workflows/directory_writer.yml index 361a465e60..b8403ee32c 100644 --- a/.github/workflows/directory_writer.yml +++ b/.github/workflows/directory_writer.yml @@ -1,8 +1,5 @@ name: Directory writer on: - push: - branches: - - main schedule: # ┌───────────── minute (0 - 59) # │ ┌───────────── hour (0 - 23) From ab3cad5ecd3fcff59defc9ee6c183cf50b4db13f Mon Sep 17 00:00:00 2001 From: David Leal Date: Fri, 4 Aug 2023 15:08:07 -0600 Subject: [PATCH 3/3] chore: run directory workflow daily --- .github/workflows/directory_writer.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/directory_writer.yml b/.github/workflows/directory_writer.yml index b8403ee32c..527a55e27d 100644 --- a/.github/workflows/directory_writer.yml +++ b/.github/workflows/directory_writer.yml @@ -10,7 +10,8 @@ on: # │ │ │ │ │ # │ │ │ │ │ # * * * * * - - cron: '0 0 * * 1' + - cron: '0 0 * * *' + workflow_dispatch: jobs: build: if: github.repository == 'TheAlgorithms/C' # We only need this to run in our repository.