-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (52 loc) · 1.69 KB
/
earthly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
on:
push:
branches-ignore:
- 'v*'
pull_request:
branches: [ "main" ]
name: earthly
permissions:
contents: read
jobs:
build:
name: kickable - earthly build
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
steps:
- name: harden runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- name: checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: update git branch
run: |
branch=""
if [ -n "$GITHUB_HEAD_REF" ]; then
branch="$GITHUB_HEAD_REF"
else
branch="${GITHUB_REF##*/}"
fi
git checkout -b "$branch" || true
- name: setup earthly
uses: earthly/actions-setup@be3fe0c1f84e9776b5a184d21bf7a4a779ea2e6b # v1.0.8
with:
version: latest
- name: select satellite
run: earthly sat select maui
- name: hash
id: hash
shell: bash
run: |
echo ::set-output name=cargo_lock::${{ hashFiles('Cargo.lock') }}
echo ::set-output name=workflow_yml::${{ hashFiles('.github/workflows/earthly.yml') }}
- name: cache earthly
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
continue-on-error: false
with:
path: /var/lib/docker/volumes/earthly-cache/
key: earthly-${{ steps.hash.outputs.cargo_lock }}-${{ steps.hash.outputs.workflow_yml }}
- name: run build
run: earthly --ci --save-inline-cache --use-inline-cache --max-remote-cache +archive