Skip to content

Bump hashicorp/aws from 6.14.1 to 6.19.0 in /infrastructure/stacks/development-and-deployment-tools #734

Bump hashicorp/aws from 6.14.1 to 6.19.0 in /infrastructure/stacks/development-and-deployment-tools

Bump hashicorp/aws from 6.14.1 to 6.19.0 in /infrastructure/stacks/development-and-deployment-tools #734

name: "Update Pull Request description with Template"
on:
pull_request:
types: [opened]
branches-ignore:
- "dependabot/**"
permissions:
contents: read
pull-requests: write
jobs:
update-pull-request:
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Branch Name
uses: mdecoleman/pr-branch-name@v3.0.0
id: branch_name
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Get branch number
run: echo "BRANCH_NUMBER=$(echo ${{ steps.branch_name.outputs.branch }} | grep -Eo '[A-Za-z]{2,5}-[0-9]{1,5}')" >> $GITHUB_ENV
- name: Get branch designator
run: echo "BRANCH_DESIGNATOR=$(echo ${{ steps.branch_name.outputs.branch }} | sed 's|/.*||')" >> $GITHUB_ENV
- name: Get template name
run: echo "TEMPLATE_NAME=$(cat .github/PULL_REQUEST_TEMPLATE/${{ env.BRANCH_DESIGNATOR }}_pull_request_template.md > /dev/null 2>&1 && echo ${{ env.BRANCH_DESIGNATOR }}_pull_request_template.md || echo task_pull_request_template.md)" >> $GITHUB_ENV
- name: Render Pull Request template
id: template
uses: chuhlomin/render-template@v1.10
with:
template: .github/PULL_REQUEST_TEMPLATE/${{ env.TEMPLATE_NAME }}
vars: |
BRANCH_NUMBER: ${{ env.BRANCH_NUMBER }}
BRANCH_DESIGNATOR: ${{ env.BRANCH_DESIGNATOR }}
- uses: tzkhan/pr-update-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
head-branch-regex: "${{ env.BRANCH_DESIGNATOR }}/.*"
body-template: ${{ steps.template.outputs.result }}
body-update-action: "replace"