Skip to content

Commit 619486b

Browse files
chore: Adds Github Actions linter (#1988)
* 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]>
1 parent 42f04b1 commit 619486b

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

.github/workflows/code-health.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
run: make tools generate-mocks
2525
- name: Check for uncommited files
2626
run: |
27-
export FILES=$(git ls-files -o -m --directory --exclude-standard --no-empty-directory)
28-
export LINES=$(echo "$FILES" | awk 'NF' | wc -l)
29-
if [ $LINES -ne 0 ]; then
27+
FILES=$(git ls-files -o -m --directory --exclude-standard --no-empty-directory)
28+
LINES=$(echo "$FILES" | awk 'NF' | wc -l)
29+
if [ "${LINES}" -ne 0 ]; then
3030
echo "Detected files that need to be committed:"
31-
echo "$FILES" | sed -e "s/^/ /"
31+
echo "${FILES//^/ }"
3232
echo ""
3333
echo "Mock skeletons are not up-to-date, you may have forgotten to run mockery before committing your changes."
3434
exit 1
@@ -61,6 +61,11 @@ jobs:
6161
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804
6262
with:
6363
version: v1.56.2
64+
- name: actionlint
65+
run: |
66+
make tools
67+
actionlint -verbose -color
68+
shell: bash
6469
website-lint:
6570
runs-on: ubuntu-latest
6671
steps:

.github/workflows/migration-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
run: |
4848
LAST_RELEASE=$(curl -sSfL -X GET https://api.github.com/repos/mongodb/terraform-provider-mongodbatlas/releases/latest | jq -r '.tag_name | ltrimstr("v")')
4949
echo "Last release: $LAST_RELEASE"
50-
echo "last_provider_version=$LAST_RELEASE" >> $GITHUB_OUTPUT
50+
echo "last_provider_version=${LAST_RELEASE}" >> "${GITHUB_OUTPUT}"
5151
5252
change-detection:
5353
runs-on: ubuntu-latest

.github/workflows/release.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ jobs:
5555
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
5656
passphrase: ${{ secrets.PASSPHRASE }}
5757
- name: Set the user terminal
58-
run: export GPG_TTY=$(tty)
58+
run: |
59+
GPG_TTY=$(tty)
60+
export GPG_TTY
5961
- name: Run GoReleaser
6062
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8
6163
with:

0 commit comments

Comments
 (0)