Skip to content

Commit 23ed2a3

Browse files
committed
Redirects github action
1 parent ffdd49c commit 23ed2a3

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/outputs/renamed_files.txt

Whitespace-only changes.

.github/workflows/add-redirects.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Add Redirects for Deleted or Renamed Files
2+
on:
3+
workflow_call:
4+
pull_request_target:
5+
jobs:
6+
get-pr-changes:
7+
name: Get Renamed Files
8+
runs-on: ubuntu-latest
9+
permissions:
10+
issues: write
11+
contents: write
12+
pull-requests: write
13+
repository-projects: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Get renamed files
17+
id: changed-files
18+
# pin to a specific commit to ensure stability
19+
uses: tj-actions/changed-files@c65cd883420fd2eb864698a825fc4162dd94482c
20+
with:
21+
files: |
22+
source/**
23+
*.txt
24+
include_all_old_new_renamed_files: 'true'
25+
write_output_files: 'true'
26+
- name: List renamed files
27+
id: output-renamed
28+
env:
29+
RENAMED_FILES: ${{ steps.changed_files.outputs.all_old_new_renamed_files }}
30+
run: |
31+
cat .github/outputs/renamed_files.txt

0 commit comments

Comments
 (0)