From bf73ee5f8fc9e707aad8e3c1528b215418bad81f Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 2 Feb 2022 12:41:31 +0800 Subject: [PATCH] Update CI workflow --- .github/workflows/build.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index daa93e02..9f530088 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,5 @@ -name: "Build and push to binary cache" -on: - push: - branches: - - master +name: "Build packages" +on: [pull_request, push] jobs: build: runs-on: ubuntu-latest @@ -11,7 +8,9 @@ jobs: - uses: cachix/install-nix-action@v16 with: nix_path: nixpkgs=channel:nixos-unstable - - uses: cachix/cachix-action@v10 + - name: Prepare push to binary cache + uses: cachix/cachix-action@v10 + if: ${{ github.ref == 'refs/heads/master' }} with: name: foo-dogsquared authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'