particle-os-cli/.github/workflows/build.yml
Gerald Pinder 097dbb391a
fix: Improve workflow for main branch and PRs (#17)
This makes it so that the main branch will push images but PRs won't.
This also puts integration tests back in the `+all` target.
2024-01-27 11:44:54 -06:00

38 lines
729 B
YAML

name: Earthly main branch +build
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:
use-cache: true
version: v0.8.2
# 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
run: earthly --push --ci -P +build