From 38a18f2990ade11e4a5359fe2899f9d1cf196e64 Mon Sep 17 00:00:00 2001 From: "Felt, Nicholas" Date: Wed, 28 Aug 2024 08:51:30 -0700 Subject: [PATCH] fix: Fix issues found by actionlint in workflows --- .../workflows/_reusable-check-api-for-breaking-changes.yml | 2 +- .github/workflows/_reusable-package-release.yml | 2 +- .github/workflows/_reusable-publish-api-comparison.yml | 6 +++--- .pre-commit-config.yaml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/_reusable-check-api-for-breaking-changes.yml b/.github/workflows/_reusable-check-api-for-breaking-changes.yml index 026a2120..5cc43631 100644 --- a/.github/workflows/_reusable-check-api-for-breaking-changes.yml +++ b/.github/workflows/_reusable-check-api-for-breaking-changes.yml @@ -30,7 +30,7 @@ jobs: run: | echo "## Breaking API Changes" > breaking_changes.md echo "\`\`\`" >> breaking_changes.md - griffe check --format=verbose --against=$(git rev-parse origin/main) --search=src "$PACKAGE_NAME" 2>&1 | tee -a breaking_changes.md + griffe check --format=verbose --against="$(git rev-parse origin/main)" --search=src "$PACKAGE_NAME" 2>&1 | tee -a breaking_changes.md - name: Finish writing summary file run: echo "\`\`\`" >> breaking_changes.md - uses: actions/upload-artifact@v4 diff --git a/.github/workflows/_reusable-package-release.yml b/.github/workflows/_reusable-package-release.yml index e18be881..8c71ee40 100644 --- a/.github/workflows/_reusable-package-release.yml +++ b/.github/workflows/_reusable-package-release.yml @@ -87,7 +87,7 @@ jobs: - name: python-versions-array input missing if: ${{ inputs.build-and-publish-python-package == true && (inputs.python-versions-array == null || inputs.python-versions-array == '') }} run: | - echo "The `python-versions-array` input is required when `build-and-publish-python-package` is set to `true`." + echo "The python-versions-array input is required when the build-and-publish-python-package input is set to true." exit 1 - if: ${{ endsWith(github.repository, '/python-package-ci-cd') }} # Run the local action when this is run in the python-package-ci-cd repository uses: ./actions/find_unreleased_changelog_items diff --git a/.github/workflows/_reusable-publish-api-comparison.yml b/.github/workflows/_reusable-publish-api-comparison.yml index 91f68fc9..35332c62 100644 --- a/.github/workflows/_reusable-publish-api-comparison.yml +++ b/.github/workflows/_reusable-publish-api-comparison.yml @@ -18,10 +18,10 @@ jobs: path: artifacts - name: Check for breaking changes run: | - if grep -Pzl '\n```\n```' artifacts/breaking_changes.md; then - echo "BREAKING_CHANGES=false" >> $GITHUB_ENV + if grep -Pzl "\n\`\`\`\n\`\`\`" artifacts/breaking_changes.md; then + echo "BREAKING_CHANGES=false" >> "$GITHUB_ENV" else - echo "BREAKING_CHANGES=true" >> $GITHUB_ENV + echo "BREAKING_CHANGES=true" >> "$GITHUB_ENV" fi - name: Fetch PR number id: pr diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1794faca..a4c394e4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: - repo: https://github.com/rhysd/actionlint rev: v1.7.1 hooks: - - id: actionlint + - id: actionlint-docker - repo: https://github.com/commitizen-tools/commitizen rev: d7e01aa9b0cfe3c1b732e66d523bbd0656221127 # frozen: v3.29.0 hooks: