Skip to content

Merge branch 'torrent' #553

Merge branch 'torrent'

Merge branch 'torrent' #553

Workflow file for this run

name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
go-version: [ '1.22' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: false
- name: Build
run: go build -v -tags fts5 ./...
- name: Test
run: CGO_ENABLED=1 go test -v -race -tags fts5 ./... -covermode=atomic -coverprofile=coverage.out
- name: Upload coverage report
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.out
flags: unittests
verbose: true
- name: GoLang CI Lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
only-new-issues: true
skip-pkg-cache: true
skip-build-cache: true
args: --timeout=5m
docker:
needs: build
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
context: .
tags: ghcr.io/tgragnato/magnetico:next
push: true