generated from pulumi/pulumi-tf-provider-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (43 loc) · 1.54 KB
/
lint.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt
name: lint
on:
workflow_call:
inputs: {}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_REGISTRY }}
NPM_TOKEN: ${{ secrets.CI_NPM_REGISTRY }}
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_ORG_KEY }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
PULUMI_API: https://api.pulumi-staging.io
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/..
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
PYPI_USERNAME: __token__
TF_APPEND_USER_AGENT: pulumi
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Install go
uses: actions/setup-go@v5
with:
# The versions of golangci-lint and setup-go here cross-depend and need to update together.
go-version: 1.22
# Either this action or golangci-lint needs to disable the cache
cache: false
- name: disarm go:embed directives to enable lint
continue-on-error: true # this fails if there are no go:embed directives
run: |
git grep -l 'go:embed' -- provider | xargs sed -i 's/go:embed/ goembed/g'
- name: prepare upstream
continue-on-error: true
run: make upstream
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.58.0
working-directory: provider