From 2e922271645d68b7ca8adbd898428cd61987fd58 Mon Sep 17 00:00:00 2001
From: Jean-Michel Picod <jmichel@google.com>
Date: Tue, 3 Mar 2020 12:05:38 +0100
Subject: [PATCH] Fix cargo audit workflow

The env context is only available at the step level, not the job one so
we need to use the github context instead. But the head_ref will only be
populated if we run in a pull_request event. So until we find a better
solution, let's match on the repo URL.
---
 .github/workflows/cargo_audit.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/cargo_audit.yml b/.github/workflows/cargo_audit.yml
index 584dc20..25e8ff2 100644
--- a/.github/workflows/cargo_audit.yml
+++ b/.github/workflows/cargo_audit.yml
@@ -6,7 +6,7 @@ on:
 jobs:
   audit:
     runs-on: ubuntu-18.04
-    if: env.GITHUB_HEAD_REF == 0
+    if: github.repository == 'google/OpenSK'
     steps:
       - uses: actions/checkout@v2
       - uses: actions-rs/toolchain@v1
-- 
GitLab