Skip to content

chore: upgrade/validate Kuadrant 1.4.2 #1293

chore: upgrade/validate Kuadrant 1.4.2

chore: upgrade/validate Kuadrant 1.4.2 #1293

Workflow file for this run

name: MaaS API
on:
push:
branches:
- main
pull_request:
paths:
- 'maas-api/**'
permissions:
actions: read
contents: read
env:
PROJECT_DIR: maas-api
defaults:
run:
working-directory: maas-api
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Align golangci-lint version with Makefile
id: golangci-version
run: |
VERSION=$(grep '^GOLANGCI_LINT_VERSION' tools.mk | cut -d'=' -f2 | tr -d ' ?')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- uses: actions/setup-go@v6
with:
go-version-file: maas-api/go.mod
cache: true
cache-dependency-path: maas-api/go.sum
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: ${{ steps.golangci-version.outputs.version }}
working-directory: ${{ env.PROJECT_DIR }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version-file: ${{ env.PROJECT_DIR }}/go.mod
cache: true
cache-dependency-path: ${{ env.PROJECT_DIR }}/go.sum
- name: Run tests
run: make test
- name: Upload coverage reports
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-reports
path: |
${{ env.PROJECT_DIR }}/coverage.out
${{ env.PROJECT_DIR }}/coverage.html
retention-days: 30
- name: Build image
run: make build-image
- name: Login to Quay.io
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.APP_QUAY_USERNAME }}
password: ${{ secrets.APP_QUAY_TOKEN }}
- name: Push image to Quay.io
if: github.event_name == 'push'
run: |
make build-push-image
make build-push-image -e TAG=${{ github.sha }}