2022-03-10 13:34:07 -08:00
|
|
|
# actions-setup
|
|
|
|
GitHub Actions for setting up earthly
|
2021-04-20 15:28:53 -07:00
|
|
|
|
2021-04-21 11:02:16 -07:00
|
|
|
To use earthly with hithub actions, create a file under `.github/workflows/ci.yml` with the contents:
|
2021-04-20 15:28:53 -07:00
|
|
|
|
|
|
|
```yml
|
|
|
|
name: GitHub Actions CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tests:
|
|
|
|
name: example earthly test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-10 12:10:21 -08:00
|
|
|
- uses: earthly/actions-setup@v1
|
2021-04-20 15:28:53 -07:00
|
|
|
with:
|
2022-03-10 12:48:20 -08:00
|
|
|
version: "latest" # or pin to an specific version, e.g. "v0.6.10"
|
2021-04-20 15:28:53 -07:00
|
|
|
- uses: actions/checkout@v2
|
2022-03-10 13:34:07 -08:00
|
|
|
- name: Docker login # to avoid dockerhub rate-limiting
|
|
|
|
run: docker login --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_PASSWORD }}"
|
2021-04-20 15:28:53 -07:00
|
|
|
- name: what version is installed?
|
|
|
|
run: earthly --version
|
|
|
|
- name: run the earthly hello world
|
|
|
|
run: earthly github.com/earthly/hello-world:main+hello
|
|
|
|
```
|
2021-04-21 11:02:16 -07:00
|
|
|
|