Skip to content

CI

CI #9

Workflow file for this run

name: CI
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # needed for git describe
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: extractions/setup-just@v2
- name: Check (fmt + vet + test + QA smoke)
run: just check
- name: Build all binaries
run: just build
docker:
needs: check
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: extractions/setup-just@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
env:
DOCKER_REPO: ${{ secrets.DOCKERHUB_USERNAME }}/taskflow
run: |
just docker-build-cached
just docker-push latest
just docker-push ${{ github.sha }}
# If this is a tag push, also push the semver tag.
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
just docker-push "${{ github.ref_name }}"
fi