Skip to content

Commit

Permalink
ci: add ci step to validate go mod tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
royhadad committed Jul 18, 2023
1 parent 9b497ea commit 0e909f4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/go-mod-tidy-validation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: go mod tidy validation
on:
pull_request:
branches:
- main
jobs:
go_mod_tidy_validation:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install go
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: run go mod tidy
run: go mod tidy
- name: Check for file changes
shell: bash
run: |
if [ -n "$(git diff)" ]; then
echo "::error::go-mod-tidy-validation failed, did you forget to run \"go mod tidy\"?"
exit 1
fi
4 changes: 0 additions & 4 deletions .github/workflows/helm-docs-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,20 @@ on:
pull_request:
branches:
- main

jobs:
helm_docs_validation:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install helm-docs
shell: bash
run: |
curl -LO https://github.com/norwoodj/helm-docs/releases/download/v1.11.0/helm-docs_1.11.0_Linux_x86_64.tar.gz
tar -xvf helm-docs_1.11.0_Linux_x86_64.tar.gz
sudo mv helm-docs /usr/local/bin/
- name: Generate Helm Docs
run: make generate-helm-docs

- name: Check for file changes
shell: bash
run: |
Expand Down

0 comments on commit 0e909f4

Please sign in to comment.