From 4d1c6cb9e082a61d39cd08aaf7e40c5e3eb80ae1 Mon Sep 17 00:00:00 2001 From: Martin Wimpress <304639+flexiondotorg@users.noreply.github.com> Date: Fri, 21 Jul 2023 17:30:09 +0100 Subject: [PATCH] DS-970: Add Magic Nix Cache and other workflow changes (#569) * DS-970: Add Magic Nix Cache and other workflow changes An assortment of GitHub Workflow changes, potentially including: - Enable DeterminateSystems/magic-nix-cache-action@main - Reference all DeterminateSystems actions via @main - Make update.yaml consistent across repos - Remove unnecessary github-token: from nix-installer-action - Update actions/checkout@v2 to actions/checkout@v3 * ci: clearly name steps in update.yml --- .github/workflows/ci.yml | 4 ++-- .github/workflows/update.yml | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52807240..7838c9a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,13 +12,13 @@ jobs: steps: - uses: actions/checkout@v3 - name: Check Nixpkgs input - uses: DeterminateSystems/flake-checker-action@v4 + uses: DeterminateSystems/flake-checker-action@main with: fail-mode: true check-outdated: false # PRs shouldn't fail because main's nixpkgs is out of date - name: Install Nix uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@v1 + - uses: DeterminateSystems/magic-nix-cache-action@main - name: Check rustfmt run: nix develop --command check-rustfmt - name: Check Spelling diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 07a78147..19b53408 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -6,13 +6,15 @@ on: jobs: lockfile: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - name: Checkout repository + - name: Checkout uses: actions/checkout@v3 - name: Install Nix uses: DeterminateSystems/nix-installer-action@main - with: - github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Enable magic Nix cache + uses: DeterminateSystems/magic-nix-cache-action@main + - name: Check flake + uses: DeterminateSystems/flake-checker-action@main - name: Update flake.lock - uses: DeterminateSystems/update-flake-lock@v16 + uses: DeterminateSystems/update-flake-lock@main