From 401a5f787a5a4b1e37f379b6751787104f42f877 Mon Sep 17 00:00:00 2001 From: Leo Antoli <430982+lantoli@users.noreply.github.com> Date: Tue, 5 Mar 2024 11:14:21 +0100 Subject: [PATCH] fix action linter issues --- .github/workflows/code-health.yml | 8 ++++---- .github/workflows/migration-tests.yml | 2 +- .github/workflows/release.yml | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/code-health.yml b/.github/workflows/code-health.yml index a208b599f6..a0ca3d3610 100644 --- a/.github/workflows/code-health.yml +++ b/.github/workflows/code-health.yml @@ -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 diff --git a/.github/workflows/migration-tests.yml b/.github/workflows/migration-tests.yml index 63b093edd9..d0aadd5750 100644 --- a/.github/workflows/migration-tests.yml +++ b/.github/workflows/migration-tests.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 39cc8839bf..4577f46915 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: