-
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.38 KB
/
Init.yml
File metadata and controls
52 lines (45 loc) · 1.38 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Init
permissions:
contents: write
actions: write
on:
push:
branches:
- main
jobs:
init:
if: github.repository != 'gendloop/template-gendloopSubmodules'
runs-on: ubuntu-latest
steps:
- name: get-repo-name
id: get-repo-name
run: |
repo_name=${GITHUB_REPOSITORY#*/}
echo "reponame=$repo_name" >> "$GITHUB_OUTPUT"
- name: replace-README
uses: gendloop/replace-str@v1.0.1
with:
token: ${{ github.token }}
path-to-replace: README.md
replace-to-path: README.md
str-to-replace: "RepoName"
replace-to-str: ${{ steps.get-repo-name.outputs.reponame }}
- name: remove
working-directory: ${{ github.workspace }}
shell: pwsh
run: |
Remove-Item .github/workflows/Init.yml
if (Test-Path sync_log.md) { Remove-Item sync_log.md -Force }
- name: remove-useless-files-for-others
if: ${{ github.actor != 'gendloop' }}
working-directory: ${{ github.workspace }}
shell: pwsh
run: |
Remove-Item scripts/downloadFilesFromRepo.json
Remove-Item .github/workflows/Sync_Download.yml
Remove-Item .github/FUNDING.yml
- name: git-push
uses: gendloop/git-push@v1.0.0
with:
token: ${{ github.token }}
commit: "chore: Remove Init.yml"