Skip to content

chore(deps): update pinned versions of GitHub Actions #318

chore(deps): update pinned versions of GitHub Actions

chore(deps): update pinned versions of GitHub Actions #318

Workflow file for this run

name: auto-approve
on:
pull_request_target:
types:
- opened
- labeled
- ready_for_review
- reopened
concurrency: ${{ github.workflow }}-${{ github.head_ref }}
env:
GIT_REF: ${{ github.event.pull_request.head.ref }}
GIT_REPO: ${{ github.event.pull_request.head.repo.full_name }}
PR_ID: ${{ github.event.pull_request.number }}
jobs:
approve:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
if: contains(github.event.pull_request.labels.*.name, 'auto-approve') && github.event.pull_request.draft == false
steps:
- name: Checkout PR
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ env.GIT_REF }}
repository: ${{ env.GIT_REPO }}
- name: Auto-approve PRs by other users as team-tf-cdk
if: github.event.pull_request.user.login != 'team-tf-cdk' && (contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.pull_request.author_association) || github.actor == 'dependabot[bot]' || github.actor == 'hashicorp-tsccr[bot]')
env:
GH_TOKEN: ${{ secrets.GH_WORKFLOW_TOKEN }}
run: gh pr review $PR_ID --approve
- name: Auto-approve PRs by team-tf-cdk as github-actions[bot]
if: github.event.pull_request.user.login == 'team-tf-cdk'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr review $PR_ID --approve