[DRAFT] Stage docs reboot for Eliot #7065
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: Alias reminder | |
on: | |
pull_request_target: | |
branches: [ main ] | |
types: [ labeled, synchronize ] | |
jobs: | |
alias_reminder: | |
name: Check for moved files | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{github.event.pull_request.head.sha}} | |
fetch-depth: 0 | |
- name: Check for moved files | |
shell: pwsh | |
id: check_files_moved | |
run: | | |
$diff = git diff -M --find-renames=10 --summary ${{github.event.pull_request.base.sha}} | |
$SourceDiff = $diff | Where-Object { $_ -match 'rename.*.md.*$' } | |
$HasDiff = $SourceDiff.Length -gt 0 | |
Write-Host "::set-output name=files_moved::$HasDiff" | |
Write-Host "::set-output name=files::$SourceDiff" | |
- name: Comment on PR with changed files | |
if: steps.check_files_moved.outputs.files_moved == 'True' | |
uses: marocchino/[email protected] | |
with: | |
recreate: true | |
message: | | |
It looks like the following files may have been renamed. Please ensure you set all needed aliases: | |
${{ steps.check_files_moved.outputs.files }} | |
GITHUB_TOKEN: ${{ secrets.PR_TOKEN }} |