Update peter-evans/create-pull-request action to v7 #318
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |