From f156df88a0749326998d5f9fbf8cb4e3cde2b43f Mon Sep 17 00:00:00 2001 From: J <2742259+javdl@users.noreply.github.com> Date: Sat, 8 Feb 2025 15:15:27 +0100 Subject: [PATCH] use flakehub cache --- .github/workflows/ci.yml | 35 ++++++++++++++++++++++++++++----- .github/workflows/daily-run.yml | 7 ++++++- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2b8ef6..aeb1ca5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,13 +14,18 @@ jobs: matrix: os: [ubuntu-latest] runs-on: ${{ matrix.os }} + permissions: + contents: read + id-token: write env: DATABASE_URL: ${{ secrets.DATABASE_URL }} steps: - uses: actions/checkout@v4 - uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main + with: + determinate: true + - uses: DeterminateSystems/flakehub-cache-action@main - uses: DeterminateSystems/flake-checker-action@main - name: Run unit tests with coverage @@ -64,11 +69,16 @@ jobs: matrix: os: [ubuntu-latest] runs-on: ${{ matrix.os }} + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@v4 - uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main + with: + determinate: true + - uses: DeterminateSystems/flakehub-cache-action@main - uses: DeterminateSystems/flake-checker-action@main - name: Run cargo check @@ -140,11 +150,16 @@ jobs: matrix: os: [ubuntu-latest] runs-on: ${{ matrix.os }} + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@v4 - uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main + with: + determinate: true + - uses: DeterminateSystems/flakehub-cache-action@main - uses: DeterminateSystems/flake-checker-action@main - name: Check files license compliance with REUSE @@ -203,10 +218,15 @@ jobs: matrix: os: [ubuntu-latest] runs-on: ${{ matrix.os }} + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main + with: + determinate: true + - uses: DeterminateSystems/flakehub-cache-action@main - uses: DeterminateSystems/flake-checker-action@main # not running this command in https://github.com/nektos/act @@ -233,11 +253,16 @@ jobs: matrix: os: [ubuntu-latest] runs-on: ${{ matrix.os }} + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@v4 - uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main + with: + determinate: true + - uses: DeterminateSystems/flakehub-cache-action@main - uses: DeterminateSystems/flake-checker-action@main - name: Build the flake diff --git a/.github/workflows/daily-run.yml b/.github/workflows/daily-run.yml index cdfb75a..6594e41 100644 --- a/.github/workflows/daily-run.yml +++ b/.github/workflows/daily-run.yml @@ -21,10 +21,15 @@ env: jobs: collect-data: runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main + with: + determinate: true + - uses: DeterminateSystems/flakehub-cache-action@main - uses: DeterminateSystems/flake-checker-action@main - name: Build and run data collection