Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Adds Github Actions linter #1988

Merged
merged 6 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
lantoli marked this conversation as resolved.
Show resolved Hide resolved
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"
lantoli marked this conversation as resolved.
Show resolved Hide resolved

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