Skip to content

ci(actions): update github actions #3264

ci(actions): update github actions

ci(actions): update github actions #3264

Workflow file for this run

name: Build PR
on:
pull_request:
branches:
- main
- "lts/v0.24"
- "feat/*"
permissions:
contents: read
jobs:
check:
name: Go Workspace Check
runs-on: ubuntu-latest
# Exlude dependabot from this check--it can't run make update-workspace,
# We'll just force the next PR author to do it instead for now
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Set go version
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version-file: 'go.mod'
- name: Update workspace
run: make update-workspace
- name: Check for go mod & workspace changes
run: |
if ! git diff --exit-code --quiet; then
echo "Changes detected:"
git diff
echo "Please run 'make update-workspace' and commit the changes."
exit 1
fi
lint:
runs-on: ubuntu-latest
steps:
# git checkout
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
persist-credentials: false
# go env
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version-file: 'go.mod'
# make lint
- name: Lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
with:
version: v2.5.0
only-new-issues: true
args: --timeout 5m $(go list -f '{{.Dir}}/...' -m | tr '\n' ' ')
test:
uses: ./.github/workflows/test.yml