Skip to content

Rewrite to Golang with Claude Code Opus 4.6 #1

Rewrite to Golang with Claude Code Opus 4.6

Rewrite to Golang with Claude Code Opus 4.6 #1

Workflow file for this run

name: CI
on:
push:
branches: [master, main, "feat/**"]
pull_request:
branches: [master, main]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
- uses: golangci/golangci-lint-action@v6
with:
version: latest
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Run tests
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
file: coverage.out
continue-on-error: true
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Build
run: go build -o vldc-bot ./cmd/bot
publish:
name: Publish & Deploy
runs-on: ubuntu-latest
needs: [lint, test, build]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: vldc-hq/vldc-bot/bot
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ghcr.io
- name: Trigger deploy
env:
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY_PROD }}
run: |
curl --fail --insecure --max-time 300 "https://$DEPLOY_HOST/deploy/bot-prod?secret=$DEPLOY_KEY"'&sync=true'