@@ -17,8 +17,12 @@ inputs:
1717 description : If true, skip authenticating to DockerHub
1818 required : false
1919 default : " false"
20- skip_earthly :
21- description : If true, skip installing Earthly and authenticating to Earthly Cloud
20+ skip_earthly_install :
21+ description : If true, skip installing Earthly
22+ required : false
23+ default : " false"
24+ skip_earthly_satellite :
25+ description : If true, skip adding authentication for the remote Earthly satellite
2226 required : false
2327 default : " false"
2428 skip_github :
@@ -133,7 +137,7 @@ runs:
133137
134138 # Earthly Provider
135139 - name : Get Earthly provider configuration
136- if : inputs.skip_earthly == 'false'
140+ if : inputs.skip_earthly_install == 'false' && inputs.skip_earthly_satellite == 'false'
137141 id : earthly
138142 shell : bash
139143 run : |
@@ -144,40 +148,30 @@ runs:
144148
145149 EARTHLY=$(echo "$BP" | jq -r .global.ci.providers.earthly)
146150 if [[ "$EARTHLY" != "null" ]]; then
147- ORG=$(echo "$BP" | jq -r .global.ci.providers.earthly.org)
148151 VERSION=$(echo "$BP" | jq -r .global.ci.providers.earthly.version)
149152
150- echo "org=$ORG" >> $GITHUB_OUTPUT
151-
152- EARTHLY_CREDS=$(echo "$BP" | jq -r .global.ci.providers.earthly.credentials)
153- if [[ "$EARTHLY_CREDS" != "null" ]]; then
154- SECRET=$(forge secret get --project . global.ci.providers.earthly.credentials)
155- TOKEN=$(echo "$SECRET" | jq -r .token)
156-
157- if [[ "$TOKEN" == "null" ]]; then
158- echo "Error: the earthly provider secret must map the secret value to 'token'"
159- exit 1
160- fi
161-
162- echo "::add-mask::$TOKEN"
163- echo "token=$TOKEN" >> $GITHUB_OUTPUT
153+ SATELLITE_CREDS=$(echo "$BP" | jq -r .global.ci.providers.earthly.satellite.credentials)
154+ if [[ "$SATELLITE_CREDS" != "null" ]]; then
155+ CONFIG_SAT="true"
164156 else
165- echo "No configuration found for Earthly Cloud provider"
157+ CONFIG_SAT="false"
158+ echo "No configuration found for remote Earthly satellite"
166159 fi
167160 else
168- echo "No configuration found for Earthly Cloud provider"
161+ echo "No configuration found for Earthly provider"
169162 fi
170163
164+ echo "sat=$CONFIG_SAT" >> GITHUB_OUTPUT
171165 echo "version=$VERSION" >> $GITHUB_OUTPUT
172166 - name : Cache Earthly binary
173167 id : cache-binary
174168 uses : actions/cache@v4
175- if : inputs.skip_earthly == 'false'
169+ if : inputs.skip_earthly_install == 'false'
176170 with :
177171 path : /usr/local/bin/earthly
178172 key : ${{ runner.os }}-${{ steps.earthly.outputs.version }}
179173 - name : Install Earthly
180- if : inputs.skip_earthly == 'false' && steps.cache-binary.outputs.cache-hit == false
174+ if : inputs.skip_earthly_install == 'false' && steps.cache-binary.outputs.cache-hit == false
181175 shell : bash
182176 run : |
183177 if [[ "${{ steps.earthly.outputs.version }}" == "latest" ]]; then
@@ -188,16 +182,12 @@ runs:
188182
189183 chmod +x /usr/local/bin/earthly
190184 /usr/local/bin/earthly bootstrap
191- # - name: Login to Earthly Cloud
192- # if: steps.earthly.outputs.token != '' && steps.earthly.conclusion == 'success'
193- # shell: bash
194- # run: |
195- # earthly account login --token "${{ steps.earthly.outputs.token }}"
196- # - name: Set Earthly organization
197- # if: steps.earthly.outputs.token != '' && steps.earthly.conclusion == 'success'
198- # shell: bash
199- # run: |
200- # earthly org select "${{ steps.earthly.outputs.org }}"
185+ - name : Configure Earthly satellite credentials
186+ if : inputs.skip_earthly_satellite == 'false' && steps.earthly.conclusion == 'success'
187+ shell : bash
188+ run : |
189+ rm -rf "$HOME/.earthly"
190+ forge configure-satellite -vvv --ci
201191
202192 # Timoni Provider
203193 - name : Get Timoni provider configuration
0 commit comments