-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 1.28 KB
/
init.yml
File metadata and controls
39 lines (32 loc) · 1.28 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
name: Initial Project Setup
on: [push]
jobs:
setup:
if: github.run_number == 1 && github.repository != 'sotashimozono/template.jl'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: '1.12'
- name: Update Discussion URL in config.yml
run: |
NEW_REPO="${{ github.repository }}"
OLD_URL="https://github.com/sotashimozono/template.jl/discussions"
NEW_URL="https://github.com/${NEW_REPO}/discussions"
sed -i "s|${OLD_URL}|${NEW_URL}|g" .github/ISSUE_TEMPLATE/config.yml
- name: Rename Module and Generate UUID
run: |
REPO_NAME=$(echo "${{ github.event.repository.name }}" | sed 's/\.jl$//')
julia .github/scripts/setup_project.jl "$REPO_NAME"
- name: Commit and Push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git rm .github/workflows/init.yml
git rm --ignore-unmatch .github/workflows/docker-publish.yml
git add .
git commit -m "Initialize project: Set module name to $REPO_NAME and generate new UUID"
git push