Skip to content

Commit

Permalink
Serialize workflows using Nix caching
Browse files Browse the repository at this point in the history
Alleviates the pressure on the GitHub action cache by only allowing a
single nix-caching job at a time.

Fixes TraceMachina#464
Fixes TraceMachina#611
  • Loading branch information
aaronmondal committed Jan 18, 2024
1 parent 56a0972 commit 58cd3ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions: read-all

jobs:
publish-image:
runs-on: large-ubuntu-22.04
runs-on: ubuntu-22.04
permissions:
packages: write
id-token: write
Expand All @@ -28,9 +28,9 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

# - name: Cache Nix derivations TODO(aaronmondal): revisit this bit when there are less flakes or it is more understood
# uses: >- # Custom commit, last pinned at 2023-11-17.
# DeterminateSystems/magic-nix-cache-action@a04e6275a6bea232cd04fc6f3cbf20d4cb02a3e1
- name: Cache Nix derivations
uses: >- # Custom commit, last pinned at 2023-11-17.
DeterminateSystems/magic-nix-cache-action@a04e6275a6bea232cd04fc6f3cbf20d4cb02a3e1
- name: Test image
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lre.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
name: Local Remote Execution

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_run:
workflows: ["Create OCI image"]
types:
- completed

permissions: read-all

Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [large-ubuntu-22.04]
os: [ubuntu-22.04]
name: Remote / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
Expand Down

0 comments on commit 58cd3ad

Please sign in to comment.