Skip to content

Commit 9d45e9a

Browse files
Revert "Replace earthly attempt 4 (#855)" (#856)
This reverts commit 0e8bd33.
1 parent 0e8bd33 commit 9d45e9a

File tree

6 files changed

+510
-454
lines changed

6 files changed

+510
-454
lines changed

.github/earthly-setup/action.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: 'Earthly Setup'
2+
description: 'Install Earthly, and configure SSH & mTLS'
3+
4+
inputs:
5+
ssh_key:
6+
description: 'SSH key for setting up known_hosts and ssh-agent'
7+
required: false
8+
config_tar:
9+
description: 'Tarball containing earthly certs and configuration'
10+
required: false
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- name: Setup earthly
16+
uses: earthly/actions-setup@v1
17+
with:
18+
github-token: ${{ github.token }}
19+
use-cache: false
20+
version: ^0.8.0
21+
22+
- name: Configure Secrets
23+
shell: bash
24+
env:
25+
EARTHLY_TAR: ${{ inputs.config_tar }}
26+
run: |
27+
if [[ "${{ inputs.config_tar }}" != "" ]]; then
28+
mkdir -p ~/.earthly
29+
printf "%s" "$EARTHLY_TAR" | base64 -d | tar -C ~/.earthly --zstd -x
30+
fi
31+
if [[ "${{ inputs.ssh_key }}" != "" ]]; then
32+
mkdir -p ~/.ssh
33+
ssh-keyscan github.com >> ~/.ssh/known_hosts
34+
ssh-agent -a "$SSH_AUTH_SOCK" > /dev/null || true
35+
ssh-add - <<< "${{ inputs.ssh_key }}"
36+
fi

0 commit comments

Comments
 (0)