Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions actions/install-local/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@ runs:
steps:
- shell: bash
run: echo "Building Forge CLI locally..."
- name: Install Earthly
uses: earthly/actions-setup@v1
- name: Cache Earthly binary
id: cache-earthly
uses: actions/cache@v4
with:
version: latest
path: /usr/local/bin/earthly
key: ${{ runner.os }}
- name: Install Earthly
if: steps.cache-earthly.outputs.cache-hit == false
shell: bash
run: |
wget -q https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly
chmod +x /usr/local/bin/earthly
/usr/local/bin/earthly bootstrap
- name: Login to Earthly Cloud
if: steps.cache-binary.outputs.cache-hit == false
shell: bash
Expand Down
20 changes: 17 additions & 3 deletions actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,25 @@ runs:
fi

echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Install Earthly
uses: earthly/actions-setup@v1
- name: Cache Earthly binary
id: cache-binary
uses: actions/cache@v4
if: inputs.skip_earthly == 'false'
with:
version: ${{ steps.earthly.outputs.version }}
path: /usr/local/bin/earthly
key: ${{ runner.os }}-${{ steps.earthly.outputs.version }}
- name: Install Earthly
if: inputs.skip_earthly == 'false' && steps.cache-binary.outputs.cache-hit == false
shell: bash
run: |
if [[ "${{ steps.earthly.outputs.version }}" == "latest" ]]; then
wget -q https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly
else
wget -q https://github.com/earthly/earthly/releases/download/v${{ steps.earthly.outputs.version}}/earthly-linux-amd64 -O /usr/local/bin/earthly
fi

chmod +x /usr/local/bin/earthly
/usr/local/bin/earthly bootstrap
- name: Login to Earthly Cloud
if: steps.earthly.outputs.token != '' && steps.earthly.conclusion == 'success'
shell: bash
Expand Down
Loading