Skip to content

chore(deps): bump gorm.io/gorm from 1.30.0 to 1.30.2 #67

chore(deps): bump gorm.io/gorm from 1.30.0 to 1.30.2

chore(deps): bump gorm.io/gorm from 1.30.0 to 1.30.2 #67

Workflow file for this run

name: Go CI
on:
push:
branches: [ main ]
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.golangci.yml'
- '.github/workflows/go.yml'
pull_request:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.golangci.yml'
- '.github/workflows/go.yml'
workflow_dispatch:
jobs:
vet-test-update-build:
name: Vet, Test, Update and Build
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Update dependencies
run: go get all
- name: Update go.sum
run: go mod tidy
- name: Run vet
run: go vet $(go list ./...)
- name: Run tests
run: go test -vet=off $(go list ./...)
- name: Build binary
run: go build -v -o dist/QuickNote .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: QuickNote-Binary
path: dist/QuickNote
- name: Check for file changes
id: git-check
run: |
if git diff --exit-code; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request with update dependencies
if: steps.git-check.outputs.changed == 'true' && github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v7
with:
commit-message: "chore(backend): update dependencies"
title: "chore(backend): update dependencies"
body: "The `Update dependencies` action wants to apply these fixes."
branch: "chore/go-dependencies"
base: main
signoff: true
sign-commits: true
lint:
name: Lint and Auto-fix
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Run golangci-lint with auto-fix
uses: golangci/golangci-lint-action@v8
with:
version: latest
args: --fix
cache-key: golangci-lint
cache: true
- name: Check for file changes
id: git-check
run: |
if git diff --exit-code; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request with lint fixes
if: steps.git-check.outputs.changed == 'true' && github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v7
with:
commit-message: "chore(backend): fix lint issues"
title: "chore(backend): fix lint issues"
body: "The `golangci-lint` action wants to apply these fixes."
branch: "chore/go-lint-fixes"
base: main
signoff: true
sign-commits: true