Skip to content

Commit

Permalink
chore: Adds Github Actions linter (#1988)
Browse files Browse the repository at this point in the history
* add actionlint

* fix action linter issues

* TEMPORARY: simulate mock changes

* Revert "TEMPORARY: simulate mock changes"

This reverts commit ed4cc68.

* Update .github/workflows/code-health.yml

Co-authored-by: Andrea Angiolillo <[email protected]>

* Update .github/workflows/migration-tests.yml

Co-authored-by: Andrea Angiolillo <[email protected]>

---------

Co-authored-by: Andrea Angiolillo <[email protected]>
  • Loading branch information
lantoli and andreaangiolillo authored Mar 5, 2024
1 parent 42f04b1 commit 619486b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/code-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
run: make tools generate-mocks
- name: Check for uncommited files
run: |
export FILES=$(git ls-files -o -m --directory --exclude-standard --no-empty-directory)
export LINES=$(echo "$FILES" | awk 'NF' | wc -l)
if [ $LINES -ne 0 ]; then
FILES=$(git ls-files -o -m --directory --exclude-standard --no-empty-directory)
LINES=$(echo "$FILES" | awk 'NF' | wc -l)
if [ "${LINES}" -ne 0 ]; then
echo "Detected files that need to be committed:"
echo "$FILES" | sed -e "s/^/ /"
echo "${FILES//^/ }"
echo ""
echo "Mock skeletons are not up-to-date, you may have forgotten to run mockery before committing your changes."
exit 1
Expand Down Expand Up @@ -61,6 +61,11 @@ jobs:
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804
with:
version: v1.56.2
- name: actionlint
run: |
make tools
actionlint -verbose -color
shell: bash
website-lint:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/migration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: |
LAST_RELEASE=$(curl -sSfL -X GET https://api.github.com/repos/mongodb/terraform-provider-mongodbatlas/releases/latest | jq -r '.tag_name | ltrimstr("v")')
echo "Last release: $LAST_RELEASE"
echo "last_provider_version=$LAST_RELEASE" >> $GITHUB_OUTPUT
echo "last_provider_version=${LAST_RELEASE}" >> "${GITHUB_OUTPUT}"
change-detection:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ jobs:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Set the user terminal
run: export GPG_TTY=$(tty)
run: |
GPG_TTY=$(tty)
export GPG_TTY
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8
with:
Expand Down

0 comments on commit 619486b

Please sign in to comment.