diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 28fab9c..ab09bb2 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -17,7 +17,9 @@ jobs: version: v0.8.3 - name: Earthly login - if: github.repository == 'blue-build/cli' + 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 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21c55c1..f78e0c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,9 @@ jobs: version: v0.8.3 - name: Earthly login - if: github.repository == 'blue-build/cli' + 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 @@ -43,6 +45,3 @@ jobs: - name: Run build if: github.repository == 'blue-build/cli' run: earthly --push --ci -P +all - - name: Run build - if: github.repository != 'blue-build/cli' - run: earthly --ci -P +all