run private cache test only when secret is present

This commit is contained in:
Domen Kožar 2021-04-06 11:24:56 +02:00
commit 448ed60298
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246

View file

@ -2,6 +2,8 @@ name: "cachix-action test"
on: on:
pull_request: pull_request:
push: push:
branches:
- master
jobs: jobs:
public-cache: public-cache:
@ -40,6 +42,7 @@ jobs:
- run: nix-build test.nix - run: nix-build test.nix
private-cache: private-cache:
if: ${{ github.ref == 'refs/heads/master' }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, macos-latest] os: [ubuntu-latest, macos-latest]