From fe671cdd1aba5bf02125133f904fb6f9adb04b9b Mon Sep 17 00:00:00 2001 From: gerblesh <101901964+gerblesh@users.noreply.github.com> Date: Wed, 7 Feb 2024 18:15:26 -0800 Subject: [PATCH] fix: only use earthly builder if token exists (#53) This fixes workflow runs from PRs that use forks of the repo and don't contain the secret for the earthly login --- .github/workflows/build-pr.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 96b7213..6841f63 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -17,6 +17,9 @@ jobs: version: v0.8.3 - name: Earthly login + env: + EARTHLY_SAT_TOKEN: ${{ secrets.EARTHLY_SAT_TOKEN }} + if: env.EARTHLY_SAT_TOKEN != null run: | earthly account login --token ${{ secrets.EARTHLY_SAT_TOKEN }} >> /dev/null earthly org s blue-build