updating circleci arch #1230
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |