Skip to content

chore: migrate from old addresses to new ones #136

chore: migrate from old addresses to new ones

chore: migrate from old addresses to new ones #136

name: "Add Copyright Headers"
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
- ready_for_review
workflow_dispatch: {}
jobs:
add-copyright-headers:
runs-on: ubuntu-latest
env:
PULL_REQUEST_REF: ${{ github.event.pull_request.head.ref }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Set git identity
run: |-
git config user.name "team-tf-cdk"
git config user.email "github-team-tf-cdk@hashicorp.com"
- name: Setup Copywrite tool
uses: hashicorp/setup-copywrite@867a1a2a064a0626db322392806428f7dc59cb3e # v1.1.2
- name: Add headers using Copywrite tool
run: copywrite headers
- name: Check if there are any changes
id: get_changes
run: echo "changed=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT
- name: Push changes
if: steps.get_changes.outputs.changed != 0
run: |-
git add .
git commit -s -m "chore: add required copyright headers"
git push origin HEAD:$PULL_REQUEST_REF