Skip to content

fix(repository): save todo query #16

fix(repository): save todo query

fix(repository): save todo query #16

Workflow file for this run

name: CI/CD
on:
push:
branches: [ master ]
paths-ignore:
- docs/**
- configs/**
- README.md
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.x'
- name: Build
run: make build
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.x'
- name: Lint
run: make lint
- name: Upload lint artifact
uses: actions/upload-artifact@v4
with:
name: golangci-lint.out
path: golangci-lint.out
retention-days: 7
test:
name: Test
runs-on: ubuntu-latest
needs: [ build, lint ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.x'
- name: Test
run: make test
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
file: coverage.out
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage.out
path: coverage.out
retention-days: 7
sonar:
name: SonarCloud
runs-on: ubuntu-latest
needs: [ test ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Include golangci-lint
uses: actions/download-artifact@v4
with:
name: golangci-lint.out
- name: Include coverage
uses: actions/download-artifact@v4
with:
name: coverage.out
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
deliver:
name: Deliver
runs-on: ubuntu-latest
needs: [ test ]
permissions:
contents: read
packages: write
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64, linux/arm64, linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}