fix ci #1491
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
on: [push, workflow_dispatch] | |
name: "Build, test, clippy" | |
jobs: | |
earthly: | |
name: Earthly | |
runs-on: ubuntu-latest | |
env: | |
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }} | |
steps: | |
- uses: earthly/actions-setup@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
version: "latest" | |
- uses: actions/checkout@v2 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | |
with: | |
username: joepmeneer | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- 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 build, test | |
run: earthly --org ontola --ci --sat henk -P +pipeline | |
- name: Earthly build and push docker | |
run: earthly --org ontola --ci --sat henk -P --push --tag="latest,${{ github.sha }}" +docker |