forked from Trophime/course.prepost
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (41 loc) · 1.27 KB
/
init.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Execute workflow only upon repository initialisation
on:
push:
branches:
- '**'
jobs:
activate:
runs-on: ubuntu-latest
if: github.repository != 'feelpp/feelpp-project'
steps:
- run: echo ok go
initialize:
needs: activate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
token: ${{ secrets.CR_PAT_WORKFLOW }}
- name: Rename project
shell: bash
run: |
bash rename.sh $GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{secrets.CR_PAT_WORKFLOW}}
- name: Commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Push changes
uses: ad-m/github-push-action@master
with:
force_with_lease: true
github_token: ${{ secrets.CR_PAT_WORKFLOW }}
- name: Disable this workflow
shell: bash
run: |
gh workflow disable -R $GITHUB_REPOSITORY "${{ github.workflow }}"
env:
GITHUB_TOKEN: ${{secrets.CR_PAT_WORKFLOW}}