From 6d59b5676c48e738f49e1bad94bbe4e438942750 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 27 Dec 2024 07:49:56 -0800 Subject: update some of the workflows --- .github/workflows/check-links.yaml | 54 ------------------------------------- .github/workflows/check-links.yml | 54 +++++++++++++++++++++++++++++++++++++ .github/workflows/flake-checker.yml | 19 +++++++++++++ .github/workflows/flake-updater.yml | 23 ++++++++++++++++ .github/workflows/update.yml | 28 ------------------- 5 files changed, 96 insertions(+), 82 deletions(-) delete mode 100644 .github/workflows/check-links.yaml create mode 100644 .github/workflows/check-links.yml create mode 100644 .github/workflows/flake-checker.yml create mode 100644 .github/workflows/flake-updater.yml delete mode 100644 .github/workflows/update.yml diff --git a/.github/workflows/check-links.yaml b/.github/workflows/check-links.yaml deleted file mode 100644 index 97ddc8a..0000000 --- a/.github/workflows/check-links.yaml +++ /dev/null @@ -1,54 +0,0 @@ -name: Check links - -"on": - pull_request: - branches: [main] - paths: - - "**.md" - - .github/workflows/check-links.yaml - - flake.lock - push: - branches: [main] - paths: - - "**.md" - - .github/workflows/check-links.yaml - - flake.lock - schedule: - # Run once a month on the 28th. - - cron: "0 0 28 * *" - workflow_dispatch: - -jobs: - lychee: - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - uses: actions/checkout@v4 - - uses: DeterminateSystems/nix-installer-action@v16 - - uses: DeterminateSystems/magic-nix-cache-action@v8 - - name: Build the site - run: nix build --print-build-logs - - name: Restore lychee cache - uses: actions/cache/restore@v4 - with: - path: .lycheecache - key: lychee-cache - - name: Check links - id: lychee - uses: lycheeverse/lychee-action@v2 - with: - fail: false - - name: Save lychee cache - uses: actions/cache/save@v4 - if: always() - with: - key: lychee-cache - path: .lycheecache - - name: Create issue - if: steps.lychee.outputs.exit_code != 0 - uses: peter-evans/create-issue-from-file@v5 - with: - title: "[lychee] Broken links" - content-filepath: ./lychee/out.md - labels: bug, automated issue diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml new file mode 100644 index 0000000..97ddc8a --- /dev/null +++ b/.github/workflows/check-links.yml @@ -0,0 +1,54 @@ +name: Check links + +"on": + pull_request: + branches: [main] + paths: + - "**.md" + - .github/workflows/check-links.yaml + - flake.lock + push: + branches: [main] + paths: + - "**.md" + - .github/workflows/check-links.yaml + - flake.lock + schedule: + # Run once a month on the 28th. + - cron: "0 0 28 * *" + workflow_dispatch: + +jobs: + lychee: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@v16 + - uses: DeterminateSystems/magic-nix-cache-action@v8 + - name: Build the site + run: nix build --print-build-logs + - name: Restore lychee cache + uses: actions/cache/restore@v4 + with: + path: .lycheecache + key: lychee-cache + - name: Check links + id: lychee + uses: lycheeverse/lychee-action@v2 + with: + fail: false + - name: Save lychee cache + uses: actions/cache/save@v4 + if: always() + with: + key: lychee-cache + path: .lycheecache + - name: Create issue + if: steps.lychee.outputs.exit_code != 0 + uses: peter-evans/create-issue-from-file@v5 + with: + title: "[lychee] Broken links" + content-filepath: ./lychee/out.md + labels: bug, automated issue diff --git a/.github/workflows/flake-checker.yml b/.github/workflows/flake-checker.yml new file mode 100644 index 0000000..d5cb05a --- /dev/null +++ b/.github/workflows/flake-checker.yml @@ -0,0 +1,19 @@ +name: ❄️ Flake Checker + +on: + push: + branches: + - master + schedule: + - cron: '42 0 * * 6' + workflow_dispatch: + +jobs: + flake-checker: + name: Flake Checker + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@v14 + - uses: DeterminateSystems/magic-nix-cache-action@v8 + - uses: DeterminateSystems/flake-checker-action@v9 diff --git a/.github/workflows/flake-updater.yml b/.github/workflows/flake-updater.yml new file mode 100644 index 0000000..dde25ee --- /dev/null +++ b/.github/workflows/flake-updater.yml @@ -0,0 +1,23 @@ +name: ❄️ Flake Lock Updater + +on: + workflow_dispatch: + schedule: + - cron: "30 5 * * 0" + +# you need to grant permissions to create PR: +# https://github.com/DeterminateSystems/update-flake-lock/issues/75 +jobs: + update-flake-lock: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@v14 + - uses: DeterminateSystems/update-flake-lock@v24 + with: + pr-title: "Update flake.lock" + commit-msg: "chore: update flake" + pr-assignees: fcuny + pr-labels: | + dependencies + automated diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml deleted file mode 100644 index af05bdf..0000000 --- a/.github/workflows/update.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Update flake.lock" -on: - workflow_dispatch: - schedule: - - cron: "30 5 * * 0" -# you need to grant permissions to create PR: -# https://github.com/DeterminateSystems/update-flake-lock/issues/75 -jobs: - update-flake-lock: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Install Nix - uses: cachix/install-nix-action@V27 - with: - extra_nix_config: | - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - - name: Update flake.lock - id: update-flake-lock - uses: DeterminateSystems/update-flake-lock@v23 - with: - pr-title: "Update flake.lock" - commit-msg: "chore: update flake" - pr-assignees: fcuny - pr-labels: | - dependencies - automated -- cgit v1.2.3