Skip to content

Bump codecov/codecov-action from 4 to 5 #188

Bump codecov/codecov-action from 4 to 5

Bump codecov/codecov-action from 4 to 5 #188

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
check:
name: Check
runs-on: ubuntu-latest
# Execute the checks inside the container instead the VM.
container: golangci/golangci-lint:v1.61.0-alpine
steps:
- uses: actions/checkout@v4
- run: ./scripts/check/check.sh
unit-test:
name: Unit test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: make ci-test
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_UPLOAD_TOKEN }}
file: ./.test_coverage.txt
fail_ci_if_error: false
rolling-release-images:
# Only on main branch.
if: startsWith(github.ref, 'refs/heads/main')
env:
TAG_IMAGE_LATEST: "true"
PROD_IMAGE_NAME: ghcr.io/${GITHUB_REPOSITORY}
VERSION: ${GITHUB_SHA}
needs: [check, unit-test]
name: Release images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Docker login
run: docker login ghcr.io -u ${{ github.actor }} -p "${{ secrets.GITHUB_TOKEN }}"
- name: Build and publish docker images
run: make build-publish-image-all
tagged-release-images:
# Only on tags.
if: startsWith(github.ref, 'refs/tags/')
env:
PROD_IMAGE_NAME: ghcr.io/${GITHUB_REPOSITORY}
needs: [check, unit-test]
name: Tagged release images
runs-on: ubuntu-latest
steps:
- run: echo "VERSION=${GITHUB_REF#refs/*/}" >> ${GITHUB_ENV} # Sets VERSION env var.
- uses: actions/checkout@v4
- name: Docker login
run: docker login ghcr.io -u ${{ github.actor }} -p "${{ secrets.GITHUB_TOKEN }}"
- name: Build and publish docker images
run: make build-publish-image-all