chore(deps): update actions/checkout digest to 8ade135 (#27) #41
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: build | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
FORCE_COLOR: 1 | |
steps: | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 | |
with: | |
submodules: false | |
fetch-depth: 0 | |
- 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: Login to GitHub Docker | |
env: | |
DOCKER_REGISTRY: ghcr.io | |
DOCKER_USER: ${{ github.actor }} | |
DOCKER_PASS: ${{ secrets.GITHUB_TOKEN }} | |
run: docker login $DOCKER_REGISTRY --username "$DOCKER_USER" --password "$DOCKER_PASS" | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN}} | |
- name: Download latest earthly | |
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.7.1/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'" | |
- name: Earthly version | |
run: earthly --version | |
- name: Run Linter and Tests | |
env: | |
EARTHLY_BUILD_ARGS: "COMMIT_HASH" | |
COMMIT_HASH: ${{ github.sha }} | |
FORCE_COLOR: 1 | |
run: | | |
earthly -P -use-inline-cache --save-inline-cache --strict --push +test | |
- uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.out # optional | |
fail_ci_if_error: false # optional (default = false) | |
verbose: false # optional (default = false) | |
# - uses: go-semantic-release/action@v1 | |
# id: semver | |
# with: | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
# allow-initial-development-versions: true | |
# force-bump-patch-version: true |