-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (29 loc) · 894 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Build
on:
push:
env:
GOPRIVATE: "github.com"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: imjasonh/[email protected]
- uses: actions/setup-go@v4
with:
go-version: 1.19
cache: true
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: git config --global url."https://YOUR_GITHUB_USERNAME:${TOKEN}@github.com".insteadOf "https://github.com"
- run: go test ./...
- run: go build ./...
- run: |-
mkdir -p cmd/vanderbot/kodata/
cp cmd/vanderbot/config/* cmd/vanderbot/kodata/
ko build github.com/ajvpot/vanderbot/cmd/vanderbot
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)