2024-09-19 10:44:54 -04:00
|
|
|
name: GitHub Actions CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tests:
|
|
|
|
name: example earthly test
|
|
|
|
runs-on: ubuntu-latest
|
2024-09-19 10:49:35 -04:00
|
|
|
env:
|
|
|
|
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
|
2024-09-19 10:44:54 -04:00
|
|
|
steps:
|
|
|
|
- uses: earthly/actions-setup@v1
|
|
|
|
with:
|
|
|
|
version: "latest" # or pin to an specific version, e.g. "0.8.1"
|
2024-09-19 10:49:35 -04:00
|
|
|
- uses: actions/checkout@v4
|
2024-09-19 11:03:20 -04:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: https://github.com/docker/setup-buildx-action@v3
|
2024-09-19 10:44:54 -04:00
|
|
|
- name: Docker login # to avoid dockerhub rate-limiting
|
|
|
|
run: docker login --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_PASSWORD }}"
|
2024-09-19 10:55:05 -04:00
|
|
|
- name: Log into ghcr.io
|
|
|
|
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: xe
|
|
|
|
password: ${{ secrets.GHCR_TOKEN }}
|
2024-09-19 10:44:54 -04:00
|
|
|
- name: what version is installed?
|
|
|
|
run: earthly --version
|
2024-09-19 10:49:35 -04:00
|
|
|
- name: use sattelite Alpha
|
2024-09-19 10:51:14 -04:00
|
|
|
run: |
|
2024-09-19 10:58:51 -04:00
|
|
|
earthly config 'global.container_frontend' 'docker-shell'
|
2024-09-19 10:51:14 -04:00
|
|
|
earthly org select me-2625
|
|
|
|
earthly sat select alpha
|
2024-09-19 10:59:31 -04:00
|
|
|
docker info
|
2024-09-19 10:44:54 -04:00
|
|
|
- name: run the earthly hello world
|
|
|
|
run: earthly github.com/earthly/hello-world:main+hello
|