Skip to content

Only pin versions if out-paths is present #14

Only pin versions if out-paths is present

Only pin versions if out-paths is present #14

Workflow file for this run

name: CI
on: push
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
runner:
# - macos-latest
- os: ubuntu-latest
system: x86_64-linux
package:
- name: terraform-1_6_2
version: 1.6.2
allow_unfree: 1
- name: terraform-1_6_1
version: 1.6.1
allow_unfree: 1
- name: terraform-1_6_0
version: 1.6.0
allow_unfree: 1
- name: terraform-1_5_7
version: 1.5.7
allow_unfree: 0
runs-on: ${{ matrix.runner.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v22
- uses: cachix/cachix-action@v12
with:
name: nixpkgs-terraform
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- run: echo "out-paths=$(nix build --impure .#${{ matrix.package.name }})" >> "$GITHUB_OUTPUT"
id: nix-build
env:
NIXPKGS_ALLOW_UNFREE: ${{ matrix.package.allow_unfree }}
- run: cachix pin nixpkgs-terraform v${{ matrix.package.version }}-${{ matrix.runner.system }} ${{ steps.nix-build.outputs.out-paths }} --keep-revisions 1
if: ${{ steps.nix-build.outputs.out-paths != '' }}