try this
This commit is contained in:
@@ -19,24 +19,12 @@ jobs:
|
|||||||
fetch-depth: 0 # Fetch all history for tags
|
fetch-depth: 0 # Fetch all history for tags
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@7be5dee1421f63d07e71ce6e0a9f8a4b07c2a487
|
uses: cachix/install-nix-action@7be5dee1421f63d07e71ce6e0a9f8a4b07c2a487
|
||||||
- name: "Cache Nix store"
|
|
||||||
uses: actions/cache@v4
|
|
||||||
id: nix-cache
|
|
||||||
with:
|
|
||||||
path: /tmp/nixcache
|
|
||||||
key: nix-${{ runner.os }}-nix-builder-image-${{ hashFiles('**/package.json', 'package-lock.json', '**/*.nix', '**/flake.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
nix-${{ runner.os }}-nix-builder-image
|
|
||||||
- name: Setup Attic Cache
|
- name: Setup Attic Cache
|
||||||
uses: ryanccn/attic-action@3354ae812cb672e1381be4c7914204c44db53866
|
uses: ryanccn/attic-action@3354ae812cb672e1381be4c7914204c44db53866
|
||||||
with:
|
with:
|
||||||
endpoint: ${{ secrets.ATTIC_ENDPOINT }}
|
endpoint: ${{ secrets.ATTIC_ENDPOINT }}
|
||||||
cache: ${{ secrets.ATTIC_CACHE }}
|
cache: ${{ secrets.ATTIC_CACHE }}
|
||||||
token: ${{ secrets.ATTIC_TOKEN }}
|
token: ${{ secrets.ATTIC_TOKEN }}
|
||||||
- name: "Import Nix store cache"
|
|
||||||
continue-on-error: true
|
|
||||||
# if: "steps.nix-cache.outputs.cache-hit == 'true'"
|
|
||||||
run: bash scripts/restore_cache.sh
|
|
||||||
- name: Build container
|
- name: Build container
|
||||||
run: nix build .#act-runner-image
|
run: nix build .#act-runner-image
|
||||||
- name: Check Nix flake
|
- name: Check Nix flake
|
||||||
@@ -67,10 +55,6 @@ jobs:
|
|||||||
BRANCH: ${{ steps.vars.outputs.BRANCH }}
|
BRANCH: ${{ steps.vars.outputs.BRANCH }}
|
||||||
run: |
|
run: |
|
||||||
nix develop -c bash scripts/deploy.sh
|
nix develop -c bash scripts/deploy.sh
|
||||||
- name: "Export Nix store cache"
|
|
||||||
if: always()
|
|
||||||
# if: "steps.nix-cache.outputs.cache-hit != 'true'"
|
|
||||||
run: bash scripts/populate_cache.sh
|
|
||||||
nix-check:
|
nix-check:
|
||||||
runs-on: nix-runner
|
runs-on: nix-runner
|
||||||
steps:
|
steps:
|
||||||
@@ -78,30 +62,14 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Fetch all history for tags
|
fetch-depth: 0 # Fetch all history for tags
|
||||||
- name: "Cache Nix store"
|
|
||||||
uses: actions/cache@v4
|
|
||||||
id: nix-cache
|
|
||||||
with:
|
|
||||||
path: /tmp/nixcache
|
|
||||||
key: nix-${{ runner.os }}-nix-builder-image-${{ hashFiles('**/package.json', 'package-lock.json', '**/*.nix', '**/flake.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
nix-${{ runner.os }}-nix-builder-image
|
|
||||||
- name: Setup Attic Cache
|
- name: Setup Attic Cache
|
||||||
uses: ryanccn/attic-action@3354ae812cb672e1381be4c7914204c44db53866
|
uses: ryanccn/attic-action@3354ae812cb672e1381be4c7914204c44db53866
|
||||||
with:
|
with:
|
||||||
endpoint: ${{ secrets.ATTIC_ENDPOINT }}
|
endpoint: ${{ secrets.ATTIC_ENDPOINT }}
|
||||||
cache: ${{ secrets.ATTIC_CACHE }}
|
cache: ${{ secrets.ATTIC_CACHE }}
|
||||||
token: ${{ secrets.ATTIC_TOKEN }}
|
token: ${{ secrets.ATTIC_TOKEN }}
|
||||||
- name: "Import Nix store cache"
|
|
||||||
continue-on-error: true
|
|
||||||
# if: "steps.nix-cache.outputs.cache-hit == 'true'"
|
|
||||||
run: bash scripts/restore_cache.sh
|
|
||||||
- name: Build container
|
- name: Build container
|
||||||
run: nix build .#act-runner-image
|
run: nix build .#act-runner-image
|
||||||
- name: Check Nix flake
|
- name: Check Nix flake
|
||||||
run: nix flake check
|
run: nix flake check
|
||||||
id: flake-check
|
id: flake-check
|
||||||
- name: "Export Nix store cache"
|
|
||||||
if: always()
|
|
||||||
# if: "steps.nix-cache.outputs.cache-hit != 'true'"
|
|
||||||
run: bash scripts/populate_cache.sh
|
|
||||||
|
|||||||
Reference in New Issue
Block a user