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
This commit is contained in:
gerblesh 2024-02-07 18:15:26 -08:00 committed by GitHub
parent d90fbcbb5f
commit fe671cdd1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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