particle-os-cli/.github/workflows/build-pr.yml
2024-02-19 20:52:20 -05:00

47 lines
1.1 KiB
YAML

name: Earthly PR +build
on:
pull_request:
env:
FORCE_COLOR: 1
jobs:
build:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: ublue-os/remove-unwanted-software@v6
- uses: earthly/actions-setup@v1
with:
version: v0.8.3
- name: Earthly login
env:
EARTHLY_SAT_TOKEN: ${{ secrets.EARTHLY_SAT_TOKEN }}
if: env.EARTHLY_SAT_TOKEN != null
run: |
earthly account login --token ${{ secrets.EARTHLY_SAT_TOKEN }} >> /dev/null
earthly org s blue-build
earthly sat s blue-build
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.ref }}
- name: Run build
run: earthly --ci +build
- name: Switch to integration-tests satellite
env:
EARTHLY_SAT_TOKEN: ${{ secrets.EARTHLY_SAT_TOKEN }}
if: env.EARTHLY_SAT_TOKEN != null
run: earthly sat s blue-build-integration-tests
- name: Run integration tests
if: github.repository == 'blue-build/cli'
run: earthly --ci -P ./integration-tests+all