ci: lock workflow dependencies to increase reproducibility
Link: https://github.com/danth/stylix/pull/519
This commit is contained in:
parent
a0838923e4
commit
1aa931f6f1
2 changed files with 10 additions and 10 deletions
12
.github/workflows/check.yml
vendored
12
.github/workflows/check.yml
vendored
|
|
@ -13,23 +13,23 @@ permissions:
|
||||||
jobs:
|
jobs:
|
||||||
evaluate:
|
evaluate:
|
||||||
name: List packages
|
name: List packages
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/nix-installer-action@main
|
uses: DeterminateSystems/nix-installer-action@v16
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
extra-conf: |
|
extra-conf: |
|
||||||
extra-experimental-features = nix-command flakes
|
extra-experimental-features = nix-command flakes
|
||||||
|
|
||||||
- name: Set up cache
|
- name: Set up cache
|
||||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
uses: DeterminateSystems/magic-nix-cache-action@v8
|
||||||
|
|
||||||
- name: List packages
|
- name: List packages
|
||||||
id: list-packages
|
id: list-packages
|
||||||
run: |
|
run: |
|
||||||
nix flake show github:${{ github.repository }}/${{ github.event.pull_request.head.sha || github.sha }} --json | jq -rc 'to_entries | map(.key as $type | select($type == "checks" or $type == "packages") | .value | to_entries | map(.key as $arch | select($arch == "x86_64-linux" or $arch == "x86_64-darwin") | .value | to_entries | map({type: $type, arch: $arch, os: (if $arch == "x86_64-linux" then "ubuntu-latest" else "macos-latest" end), key: .key})) | flatten) | flatten | "packages=\(.)"' >> $GITHUB_OUTPUT
|
nix flake show github:${{ github.repository }}/${{ github.event.pull_request.head.sha || github.sha }} --json | jq -rc 'to_entries | map(.key as $type | select($type == "checks" or $type == "packages") | .value | to_entries | map(.key as $arch | select($arch == "x86_64-linux" or $arch == "x86_64-darwin") | .value | to_entries | map({type: $type, arch: $arch, os: (if $arch == "x86_64-linux" then "ubuntu-22.04" else "macos-14" end), key: .key})) | flatten) | flatten | "packages=\(.)"' >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
packages: ${{ steps.list-packages.outputs.packages }}
|
packages: ${{ steps.list-packages.outputs.packages }}
|
||||||
|
|
@ -48,14 +48,14 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/nix-installer-action@main
|
uses: DeterminateSystems/nix-installer-action@v16
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
extra-conf: |
|
extra-conf: |
|
||||||
extra-experimental-features = nix-command flakes
|
extra-experimental-features = nix-command flakes
|
||||||
|
|
||||||
- name: Set up cache
|
- name: Set up cache
|
||||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
uses: DeterminateSystems/magic-nix-cache-action@v8
|
||||||
|
|
||||||
- name: Check ${{ matrix.check.key }}
|
- name: Check ${{ matrix.check.key }}
|
||||||
run: nix -L check github:${{ github.repository }}/${{ github.event.pull_request.head.sha || github.sha }}#${{ matrix.check.type }}.${{ matrix.check.arch }}.${{ matrix.check.key }} --no-update-lock-file
|
run: nix -L check github:${{ github.repository }}/${{ github.event.pull_request.head.sha || github.sha }}#${{ matrix.check.type }}.${{ matrix.check.arch }}.${{ matrix.check.key }} --no-update-lock-file
|
||||||
|
|
|
||||||
8
.github/workflows/docs.yml
vendored
8
.github/workflows/docs.yml
vendored
|
|
@ -12,18 +12,18 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/nix-installer-action@main
|
uses: DeterminateSystems/nix-installer-action@v16
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
extra-conf: |
|
extra-conf: |
|
||||||
extra-experimental-features = nix-command flakes
|
extra-experimental-features = nix-command flakes
|
||||||
|
|
||||||
- name: Set up cache
|
- name: Set up cache
|
||||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
uses: DeterminateSystems/magic-nix-cache-action@v8
|
||||||
|
|
||||||
- name: Build docs
|
- name: Build docs
|
||||||
run: nix -L build github:${{ github.repository }}/${{ github.sha }}#docs
|
run: nix -L build github:${{ github.repository }}/${{ github.sha }}#docs
|
||||||
|
|
@ -49,7 +49,7 @@ jobs:
|
||||||
name: github-pages
|
name: github-pages
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Deploy docs to GitHub Pages
|
- name: Deploy docs to GitHub Pages
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue