Skip to content

Commit

Permalink
CI: Run package job only if Github secrets are available
Browse files Browse the repository at this point in the history
following a trick learned from actions/runner#520
  • Loading branch information
nomeata committed Nov 28, 2020
1 parent 4e459a5 commit 2582843
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: "Build and package"
on:
pull_request:
push:

env:
SECRETS_ARE_AVAILABLE: ${{ secrets.SECRETS_ARE_AVAILABLE }}

jobs:
build:
strategy:
Expand Down Expand Up @@ -67,8 +71,8 @@ jobs:
package:
# this will only work when the jobs above have uploaded
# their stuff to the nix cache, which will only work
# in this repository
if: github.repository == 'entropia/tip-toi-reveng'
# if secrets are available
if: ${{ env.SECRETS_ARE_AVAILABLE }}
runs-on: ubuntu-latest
needs: build
steps:
Expand Down

0 comments on commit 2582843

Please sign in to comment.