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
This commit is contained in:
Martin Wimpress 2023-07-14 10:17:41 +01:00
parent 5cc3a5e24b
commit b259c61729
No known key found for this signature in database
GPG key ID: 61DF940515E06DA3

View file

@ -12,7 +12,9 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install Nix - name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4 uses: DeterminateSystems/nix-installer-action@main
- name: Enable magic Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Record existing bundle hash - name: Record existing bundle hash
run: | run: |
echo "BUNDLE_HASH=$(sha256sum <dist/index.js | sed 's/ -//')" >>$GITHUB_ENV echo "BUNDLE_HASH=$(sha256sum <dist/index.js | sed 's/ -//')" >>$GITHUB_ENV
@ -38,7 +40,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install Nix - name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4 uses: DeterminateSystems/nix-installer-action@main
with: with:
extra-conf: | extra-conf: |
narinfo-cache-negative-ttl = 0 narinfo-cache-negative-ttl = 0
@ -54,7 +56,7 @@ jobs:
# steps: # steps:
# - uses: actions/checkout@v3 # - uses: actions/checkout@v3
# - name: Install Nix # - name: Install Nix
# uses: DeterminateSystems/nix-installer-action@v4 # uses: DeterminateSystems/nix-installer-action@main
# with: # with:
# extra-conf: | # extra-conf: |
# narinfo-cache-negative-ttl = 0 # narinfo-cache-negative-ttl = 0