Add Earthly #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: LuckyTemplate CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: "*" | |
jobs: | |
specs: | |
runs-on: ubuntu-latest | |
env: | |
FORCE_COLOR: 1 | |
steps: | |
- uses: earthly/actions-setup@v1 | |
with: | |
version: v0.7.8 | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v1 | |
with: | |
image: tonistiigi/binfmt:latest | |
platforms: all | |
- uses: actions/checkout@v2 | |
- name: Put back the git branch into git (Earthly uses it for tagging) | |
run: | | |
branch="" | |
if [ -n "$GITHUB_HEAD_REF" ]; then | |
branch="$GITHUB_HEAD_REF" | |
else | |
branch="${GITHUB_REF##*/}" | |
fi | |
git checkout -b "$branch" || true | |
- name: Earthly version | |
run: earthly --version | |
- name: Run build | |
run: earthly +all | |
windows-specs: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: crystal-lang/install-crystal@v1 | |
with: | |
crystal: latest | |
- name: Run tests | |
run: crystal spec |