45 lines
1002 B
YAML
45 lines
1002 B
YAML
name: ci
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: gitfox-chapvic
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go 1.26
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.26'
|
|
cache: false
|
|
|
|
- name: Build
|
|
run: go build -v ./...
|
|
|
|
- name: Test
|
|
run: go test -race -v ./...
|
|
|
|
# docker:
|
|
# needs: build
|
|
# if: github.ref == 'refs/heads/master'
|
|
# runs-on: gitfox-chapvic
|
|
# steps:
|
|
# - uses: actions/checkout@v4
|
|
# - uses: docker/setup-buildx-action@v3
|
|
# - uses: docker/login-action@v3
|
|
# with:
|
|
# registry: mydocker.ru
|
|
# username: ${{ github.actor }}
|
|
# password: ${{ secrets.GITHUB_TOKEN }}
|
|
# - uses: docker/build-push-action@v5
|
|
# with:
|
|
# push: true
|
|
# tags: mydocker.ru/${{ github.repository }}:latest,mydocker.ru/${{ github.repository }}:${{ github.sha }}
|