Skip to content

Fix: example manager and instructions #175

Fix: example manager and instructions

Fix: example manager and instructions #175

Workflow file for this run

name: Go Checks
on:
push:
branches:
- main
- release-*
tags:
- "v*"
pull_request:
branches:
- main
- release-*
workflow_dispatch: { }
env:
GO_VERSION: '1.19'
# Keep this in sync with build/lint.sh
GOLANGCI_VERSION: '1.49.0'
USE_BUILD_CONTAINER: '1'
jobs:
detect-noop:
name: Detect No-op Changes
runs-on: ubuntu-latest
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg", "**.svg"]'
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
concurrent_skipping: false
checks:
name: Check Go Code
runs-on: ubuntu-latest
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Check boilerplate
run: make checklicense
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
# Use this action instead of running golangci directly because it can comment on pr.
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v${{ env.GOLANGCI_VERSION }}
- name: Check Diff
run: make checkdiff
test-build:
name: Test Container Build
runs-on: ubuntu-latest
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Go Caches
uses: actions/cache@v3
with:
path: |
.go/gomodcache
.go/gocache
key: ${{ runner.os }}-gobuildcontainer-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gobuildcontainer-
- name: Test Container Build
run: make container