particle-os-cli/.github/workflows/build-pr.yml
Gerald Pinder cd1e43b0c3
chore: Setup earthly satellite building (#29)
- Builds on main and tags will use the `medium` satellite that uses `x4`
rate on build minutes
  - This gives us larger cache and more memory
- Builds on PRs will use the `small` satellite that uses `x2` rate on
build minutes
- We are using the starter tier which gives us `10000` build minutes per
month and caching for our builds to make them faster
2024-01-28 13:20:13 -06:00

39 lines
841 B
YAML

name: Earthly PR +build
on:
pull_request:
env:
FORCE_COLOR: 1
jobs:
build:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
# There is a bug selecting a satellite in version 0.8
# so we use 0.7 to login and connect to the satellite
# before switching to the latest version
- uses: earthly/actions-setup@v1
with:
version: v0.7.23
- name: Earthly login
run: |
earthly account login --token ${{ secrets.EARTHLY_SAT_TOKEN }} >> /dev/null
earthly org s blue-build
earthly sat s blue-build-pr
- uses: earthly/actions-setup@v1
with:
version: v0.8.2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.ref }}
- name: Run build
run: earthly --ci -P +build