build(deps): bump github.com/aws/aws-sdk-go from 1.54.1 to 1.54.12 in /.ci/providerlint #251
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Preferred Library Version Check | |
# This check verifies that preferred library versions are used in development | |
# of net-new resources. This is done by inspecting the pull request diff for any | |
# occurrence of a non-preferred library name, typically seen in an import block. | |
# At this time the only check is for AWS SDK for Go V1, but it may be extended | |
# in the future. This check will not fail if a non-preferred library version is | |
# detected, but will leave a comment on the pull request linking to the relevant | |
# contributor documentation. | |
on: | |
pull_request_target: | |
branches: | |
- main | |
## NOTE: !!! | |
## When changing these workflows, ensure that the following is updated: | |
## - Documentation: docs/continuous-integration.md | |
## - Documentation: docs/makefile-cheat-sheet.md | |
## - Makefile: ./GNUmakefile | |
jobs: | |
diffgrep: | |
runs-on: ubuntu-latest | |
outputs: | |
found: ${{ steps.diff.outputs.found }} | |
env: | |
BASE_REF: ${{ github.event.pull_request.base.ref }} | |
steps: | |
# checkout base ref | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
# checkout pull request head ref | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Check diff for AWS SDK Go V1 | |
id: diff | |
run: | | |
git diff origin/${{ github.event.pull_request.base.ref }} internal/ | | |
(grep '^\+\s*"github.com/aws/aws-sdk-go/' && echo "found=true" >> "$GITHUB_OUTPUT") || echo "found=false" >> "$GITHUB_OUTPUT" | |
comment: | |
runs-on: ubuntu-latest | |
needs: diffgrep | |
if: needs.diffgrep.outputs.found == 'true' | |
steps: | |
- name: Find Existing PR Comment | |
id: prc | |
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0 | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: "github-actions[bot]" | |
body-includes: "A new usage of AWS SDK for Go V1 was detected" | |
- run: echo ${{ steps.prc.outputs.comment-id }} | |
- name: PR Comment | |
if: steps.prc.outputs.comment-id == '' | |
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body: |- | |
Thank you for your contribution! :rocket: | |
A new usage of AWS SDK for Go V1 was detected. Please prefer AWS SDK for Go V2 for all net-new services. If this is an enhancement or bug fix to an existing AWS SDK Go V1 based resource, this comment can be safely ignored. | |
For additional information refer to the [AWS SDK for Go Versions](https://hashicorp.github.io/terraform-provider-aws/aws-go-sdk-versions/) page in the contributor guide. |