Merge pull request #1430 from flanksource/feat/webhook-without-schedule #2768
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: Lint | |
on: | |
push: | |
branches: | |
- master | |
- main | |
pull_request: | |
merge_group: | |
permissions: read-all | |
jobs: | |
golangci: | |
permissions: | |
contents: read # for actions/checkout to fetch code | |
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | |
- name: Install Go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version: 1.20.x | |
- name: golangci-lint | |
with: | |
version: v1.52.2 # TODO: Catching new linter errors now. Need to fix those and upgrade to v1.53.0 | |
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3.4.0 | |
- name: setup node | |
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2 | |
with: | |
node-version: "12" | |
- name: Check auto-generated files | |
env: | |
CI: false | |
run: | | |
make resources | |
git checkout hack/generate-schemas/go.* | |
git checkout fixtures/datasources/go.* | |
git diff | |
changed_files=$(git status -s) | |
[[ -z "$changed_files" ]] || (printf "Change is detected in some files: \n$changed_files\n Did you run 'make resources' before sending the PR?" && exit 1) | |
helm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
- name: Set up Helm | |
uses: azure/setup-helm@18bc76811624f360dbd7f18c2d4ecb32c7b87bab # v1.1 | |
with: | |
version: v3.4.0 | |
- name: Set up Python | |
uses: actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2.3.4 | |
with: | |
python-version: 3.7 | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@5f16c27cf7a4fa9c776ff73734df3909b2b65127 # v2.1.0 | |
- name: Lint chart | |
run: ct lint --charts ./chart |