Skip to content

Merge pull request #156 from Pix4D/set-add #624

Merge pull request #156 from Pix4D/set-add

Merge pull request #156 from Pix4D/set-add #624

Workflow file for this run

# See https://docs.github.com/en/actions/reference/
on: [push]
name: ci
env:
go-version: 1.22.x
task-version: v3.28.0
jobs:
all:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
- name: Install Task
run: go install github.com/go-task/task/v3/cmd/task@${{ env.task-version }}
- name: Checkout code
uses: actions/checkout@v3
with:
# By default, actions/checkout will persist the GITHUB_TOKEN, so that further
# steps in the job can perform authenticated git commands (that is: WRITE to
# the repo). Following the Principle of least privilege, we disable this as long
# as we don't need it.
persist-credentials: false
- run: task ci:setup
- run: task lint
- run: task build
- run: task test:all
env:
COGITO_TEST_OAUTH_TOKEN: ${{ secrets.COGITO_TEST_OAUTH_TOKEN }}
COGITO_TEST_GCHAT_HOOK: ${{ secrets.COGITO_TEST_GCHAT_HOOK }}
- run: task docker:build
- run: task docker:smoke
- run: task docker:login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
- run: task docker:push
- run: task docker:maybe-push-release
- run: task ci:teardown
# ALWAYS run this step, also if any previous step failed.
if: always()