Skip to content

Commit 27a46b0

Browse files
committed
Instead of messing with environment variables, use github.base_ref
As per https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions, it is possible to use the `github.<...>` context to access some information about the current action run. Signed-off-by: Marco Pivetta <[email protected]>
1 parent ec105bb commit 27a46b0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/mutation-tests.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,10 @@ jobs:
2121
- "ubuntu-latest"
2222

2323
steps:
24-
- name: "Load CI environment variables"
25-
uses: FranzDiebold/github-env-vars-action@v2
26-
27-
- name: "Checkout $GITHUB_BASE_REF branch (for diffing)"
24+
- name: "Checkout github.base_ref branch (for diffing)"
2825
uses: "actions/checkout@v2"
2926
with:
30-
ref: ${{ env.GITHUB_BASE_REF }}
27+
ref: ${{ github.base_ref }}
3128

3229
- name: "Checkout"
3330
uses: "actions/checkout@v2"
@@ -65,8 +62,9 @@ jobs:
6562
vendor/bin/roave-infection-static-analysis-plugin \
6663
--ignore-msi-with-no-mutations \
6764
--git-diff-filter=AM \
68-
--git-diff-base="$GITHUB_BASE_REF"
65+
--git-diff-base=$GITHUB_BASE_REF
6966
env:
7067
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
7168
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
69+
GITHUB_BASE_REF: ${{ github.base_ref }}
7270

0 commit comments

Comments
 (0)