Skip to content

Commit

Permalink
fix: earthly-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylar Simoncelli committed Sep 23, 2024
1 parent d05a299 commit 1bd5715
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/actions/images/build-and-publish-ghcr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ runs:
ref: ${{ inputs.sha }}

- name: Setup Earthly
uses: ./.github/actions/earthly-setup
uses: ./.github/earthly-setup
with:
ssh_key: ${{ secrets.SUBSTRATE_REPO_SSH_KEY }}
config_tar: ${{ secrets.EARTHLY_TAR }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
runs:
using: composite
steps:
- name: Setup Earthly
- name: Setup earthly
uses: earthly/actions-setup@v1
with:
github-token: ${{ github.token }}
Expand All @@ -25,13 +25,12 @@ runs:
EARTHLY_TAR: ${{ inputs.config_tar }}
run: |
if [[ "${{ inputs.config_tar }}" != "" ]]; then
mkdir -p $HOME/.earthly
printf "%s" "$EARTHLY_TAR" | base64 -d | tar -C $HOME/.earthly --zstd -x
ls -al $HOME/.earthly
mkdir -p ~/.earthly
printf "%s" "$EARTHLY_TAR" | base64 -d | tar -C ~/.earthly --zstd -x
fi
if [[ "${{ inputs.ssh_key }}" != "" ]]; then
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
eval "$(ssh-agent -s)"
ssh-agent -a "$SSH_AUTH_SOCK" > /dev/null || true
ssh-add - <<< "${{ inputs.ssh_key }}"
fi
2 changes: 1 addition & 1 deletion .github/workflows/earthly-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
ref: ${{ inputs.branch }}

- name: Setup Earthly
uses: ./.github/actions/earthly-setup
uses: ./.github/earthly-setup
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci-off') }}
with:
ssh_key: ${{ secrets.SUBSTRATE_REPO_SSH_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/earthly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
ref: ${{ inputs.branch || github.ref }}

- name: Setup Earthly
uses: ./.github/actions/earthly-setup
uses: ./.github/earthly-setup
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci-off') }}
with:
ssh_key: ${{ secrets.SUBSTRATE_REPO_SSH_KEY }}
Expand Down

0 comments on commit 1bd5715

Please sign in to comment.