global caches & cargo-sweep #89
Workflow file for this run
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: GitHub Actions CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
name: +test | |
runs-on: ubuntu-latest | |
env: | |
FORCE_COLOR: 1 | |
EARTHLY_CONVERSION_PARALLELISM: "5" | |
EARTHLY_TOKEN: "${{ secrets.EARTHLY_TOKEN }}" | |
EARTHLY_INSTALL_ID: "earthly-lib-githubactions" | |
steps: | |
- uses: earthly/actions/setup-earthly@v1 | |
- uses: actions/checkout@v2 | |
- name: Docker mirror login (non fork only) | |
run: docker login registry-1.docker.io.mirror.corp.earthly.dev --username "${{ secrets.DOCKERHUB_MIRROR_USERNAME }}" --password "${{ secrets.DOCKERHUB_MIRROR_PASSWORD }}" | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository | |
- name: Configure Earthly to use mirror (non fork only) | |
run: |- | |
earthly config global.buildkit_additional_config "'[registry.\"docker.io\"] | |
mirrors = [\"registry-1.docker.io.mirror.corp.earthly.dev\"]'" | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository | |
- name: Run tests | |
run: earthly --ci -P --org earthly-technologies --satellite lib +test |