generated from AD-SDL/python_template_module
-
Notifications
You must be signed in to change notification settings - Fork 0
26 lines (22 loc) · 965 Bytes
/
rename.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: Rename Module Repo
# Only run when the new module is created
on: [create, workflow_dispatch]
jobs:
rename:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# by default, it uses a depth of 1
# this fetches all history so that we can read each commit
fetch-depth: 0
ref: ${{ github.head_ref }}
- run: |
replacement_string="$(echo '${{ github.repository }}' | awk -F '/' '{print $2}' | tr '-' '_' | tr '[:upper:]' '[:lower:]')"
replacement_string="${replacement_string%_module}"
.github/rename.sh python_template "$replacement_string"
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Renamed module"
push_options: --force
file_pattern: . :!.github # Don't modify the workflow