Bump tj-actions/changed-files from 44.5.5 to 44.5.7 in the actions group #749
Workflow file for this run
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: Fix License Headers | |
on: | |
pull_request_target: | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
header-license-fix: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout the branch from the PR that triggered the job | |
run: gh pr checkout ${{ github.event.pull_request.number }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Fix License Header | |
uses: apache/skywalking-eyes/header@v0.6.0 | |
with: | |
mode: fix | |
- name: List files changed | |
id: files-changed | |
shell: bash -l {0} | |
run: | | |
set -ex | |
export CHANGES=$(git status --porcelain | tee modified.log | wc -l) | |
cat modified.log | |
# Remove the log otherwise it will be committed | |
rm modified.log | |
echo "N_CHANGES=${CHANGES}" >> $GITHUB_OUTPUT | |
git diff | |
- name: Commit any changes | |
if: steps.files-changed.outputs.N_CHANGES != '0' | |
shell: bash -l {0} | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git pull --no-tags | |
git add * | |
git commit -m "Automatic application of license header" | |
git config push.default upstream | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |