-
Notifications
You must be signed in to change notification settings - Fork 8
83 lines (79 loc) · 2.38 KB
/
regenerate_content.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Update generated content
on:
workflow_dispatch:
push:
branches:
- "main"
jobs:
generate_gitpod:
name: Generate gitpod.yml from devcontainers
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: main
- name: Install Dev Tools
working-directory: .bin/
run: npm install
- run: |
node ./.bin/transform_devcontainer_to_gitpod.js
- name: Commit new gitpods
run: |
git config --global user.name 'Github Action'
git config --global user.email 'githubaction@users.noreply.github.com'
set +e
git add **/.gitpod.yml
git commit -m "[meta] Update GITPOD Definitions"
git pull origin --rebase main
set -e
git push
generate_readme:
needs: [generate_gitpod]
name: Generate new README and commit to repository
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: main
- name: Install Dev Tools
working-directory: .bin/
run: npm install
- name: Main README
run: |
node ./.bin/generate_README.js
- name: Language READMes
run: |
node ./.bin/generate_language_READMEs.js
- name: Commit new README
run: |
git config --global user.name 'Github Action'
git config --global user.email 'githubaction@users.noreply.github.com'
set +e
git add README.md **/README.md
git commit -m "[meta] Update README"
git pull origin --rebase main
set -e
git push
generate_language_branches:
needs: [generate_readme]
name: Force-push subtrees for all languages
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: main
- name: Install Dev Tools
working-directory: .bin/
run: npm install
- run: |
./.bin/update_and_force_push_language_branches.sh
./.bin/clean_old_branches.sh