From 51e14599685fe286f81dc5fb8b21a8137dca4c5e Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 14 Jul 2023 10:21:02 +0100 Subject: [PATCH 1/2] 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 --- .github/workflows/ci.yml | 2 ++ .github/workflows/update.yml | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 613929b..8495da6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,5 +13,7 @@ jobs: fetch-depth: 0 - name: Install Nix uses: DeterminateSystems/nix-installer-action@main + - name: Enable magic Nix cache + uses: DeterminateSystems/magic-nix-cache-action@main - name: Shellcheck run: nix-shell --run 'shellcheck $(find . -type f -name "*.sh" -executable)' diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 8098e71..b109578 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -2,15 +2,15 @@ name: update-flake-lock on: workflow_dispatch: schedule: - - cron: "0 0 * * 0" + - cron: '0 0 * * 0' jobs: lockfile: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@main - name: Update flake.lock - uses: ./. + uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: DeterminateSystems/flake-checker-action@main + - uses: ./. From 1a057b79b1e3f1edfd4cf7aef81cbae9371126de Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 21 Jul 2023 15:52:27 +0100 Subject: [PATCH 2/2] ci: clearly name steps in update.yml --- .github/workflows/update.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index b109578..29ec70c 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -8,9 +8,13 @@ jobs: lockfile: runs-on: ubuntu-22.04 steps: - - name: Update flake.lock + - name: Checkout uses: actions/checkout@v3 - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: DeterminateSystems/flake-checker-action@main - - uses: ./. + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + - 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: ./.