Add name for steps on CI #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: push | |
concurrency: | |
group: build-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Check Nix flake inputs | |
uses: DeterminateSystems/flake-checker-action@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v7 | |
- name: Setup Cachix | |
uses: cachix/cachix-action@v12 | |
with: | |
name: nixpkgs-terraform | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
skipPush: ${{ github.ref_name != 'main' }} | |
- name: Build all packages | |
run: nix flake check --impure | |
env: | |
NIXPKGS_ALLOW_UNFREE: 1 | |
templates: | |
strategy: | |
matrix: | |
template: [default, devenv] | |
fail-fast: true | |
runs-on: ubuntu-latest | |
timeout-minutes: 4 | |
needs: [build] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v7 | |
- name: Replace inputs on templates | |
run: sed -i 's/github:stackbuilders\/nixpkgs-terraform/github:stackbuilders\/nixpkgs-terraform\/${{ github.sha }}/g' templates/*/flake.nix | |
- name: Create a temporary directory | |
run: echo "tmpdir=$(mktemp -d)" >> "$GITHUB_OUTPUT" | |
id: mktemp | |
- name: Scaffold a new project | |
run: nix flake init -t ${{ github.workspace }}#${{ matrix.template }} | |
working-directory: ${{ steps.mktemp.outputs.tmpdir }} | |
- name: Run smoke test | |
run: nix develop --accept-flake-config --impure -c terraform --version | |
env: | |
NIXPKGS_ALLOW_UNFREE: 1 | |
working-directory: ${{ steps.mktemp.outputs.tmpdir }} |