go-grep-cache/.github/workflows/go.yml

35 lines
611 B
YAML
Raw Normal View History

2023-10-26 13:13:18 +00:00
name: Go
on:
2023-10-26 13:23:12 +00:00
workflow_dispatch:
2023-10-26 13:13:18 +00:00
push:
2023-10-26 13:23:12 +00:00
branches: ["main"]
paths:
- main.go
- .github/workflows/go.yml
2023-10-26 13:13:18 +00:00
pull_request:
2023-10-26 13:23:12 +00:00
branches: ["main"]
paths:
- main.go
- .github/workflows/go.yml
2023-10-26 13:13:18 +00:00
jobs:
build:
runs-on: ubuntu-latest
steps:
2023-10-26 13:23:12 +00:00
- uses: actions/checkout@v4
2023-10-26 13:13:18 +00:00
2023-10-26 13:23:12 +00:00
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
2023-10-26 13:13:18 +00:00
2023-10-26 13:23:12 +00:00
- name: Build
run: go build -v ./.
2023-10-26 13:13:18 +00:00
2023-10-26 13:23:12 +00:00
- name: Cache
uses: actions/cache@v3.3.2
with:
path: go-grep-cache
key: ${{ runner.os }}-go-grep-cache