particle-os-cli/.github/workflows/build.yml
Gerald Pinder 46700ab794
chore: Create base integration test setup (#55)
This will allow us to create a suite of tests for our new features
rather than using my personal image repo
2024-02-09 11:47:59 -05:00

48 lines
1.1 KiB
YAML

name: Earthly main branch +all
on:
workflow_dispatch:
push:
branches:
- main
env:
FORCE_COLOR: 1
jobs:
build:
permissions:
packages: write
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: earthly/actions-setup@v1
with:
version: v0.8.3
- name: Earthly login
if: github.repository == 'blue-build/cli'
run: |
earthly account login --token ${{ secrets.EARTHLY_SAT_TOKEN }} >> /dev/null
earthly org s blue-build
earthly sat s blue-build
# Setup repo and add caching
- uses: actions/checkout@v4
with:
ref: main
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run build
if: github.repository == 'blue-build/cli'
run: earthly --push --ci -P +all
- name: Run build
if: github.repository != 'blue-build/cli'
run: earthly --ci -P +all