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
This commit is contained in:
parent
73b694fd4a
commit
cd1e43b0c3
4 changed files with 45 additions and 10 deletions
16
.github/workflows/build-pr.yml
vendored
16
.github/workflows/build-pr.yml
vendored
|
|
@ -12,12 +12,24 @@ jobs:
|
|||
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:
|
||||
use-cache: true
|
||||
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
|
||||
|
||||
# Setup repo and add caching
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.ref }}
|
||||
|
|
|
|||
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
|
|
@ -1,4 +1,4 @@
|
|||
name: Earthly main branch +build
|
||||
name: Earthly main branch +all
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
|
@ -17,9 +17,21 @@ jobs:
|
|||
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
|
||||
|
||||
- uses: earthly/actions-setup@v1
|
||||
with:
|
||||
use-cache: true
|
||||
version: v0.8.2
|
||||
|
||||
# Setup repo and add caching
|
||||
|
|
@ -35,4 +47,4 @@ jobs:
|
|||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Run build
|
||||
run: earthly --push --ci -P +build
|
||||
run: earthly --push --ci -P +all
|
||||
|
|
|
|||
20
.github/workflows/tag.yml
vendored
20
.github/workflows/tag.yml
vendored
|
|
@ -23,12 +23,22 @@ jobs:
|
|||
fetch-tags: true
|
||||
token: ${{ secrets.GIT_REPO_TOKEN }}
|
||||
|
||||
#Deps
|
||||
- name: Set up Earthly
|
||||
uses: earthly/actions-setup@v1
|
||||
# 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.8.0
|
||||
use-cache: true
|
||||
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
|
||||
|
||||
- uses: earthly/actions-setup@v1
|
||||
with:
|
||||
version: v0.8.2
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue