Repository navigation
148 lines (126 loc) · 4.6 KB
/
Copy pathversion-maintenance.yml
File metadata and controls
148 lines (126 loc) · 4.6 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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: "Version maintenance"
on:
push:
branches:
- master
- gromacs-2027
- namd-3.1
jobs:
update-versions:
name: Update version strings
runs-on: ubuntu-latest
concurrency:
group: update-version-strings-master
cancel-in-progress: false
steps:
- name: Generate app token
id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.UPDATE_VERSIONS_CLIENT_ID }}
private-key: ${{ secrets.UPDATE_VERSIONS_PRIVATE_KEY }}
- name: Checkout Colvars repo in full
uses: actions/checkout@v7
with:
ref: master
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
- name: Update version strings only in the master branch
if: ${{ github.ref == 'refs/heads/master' }}
env:
LAST_COMMIT_BEFORE_PUSH: ${{ github.event.before }}
run: |
git config user.email "noreply@github.com"
git config user.name "CI runner"
source devel-tools/version_functions.sh
update_all_versions "${LAST_COMMIT_BEFORE_PUSH}"
git push origin master
update-wiki:
name: Update Wiki repo
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' }}
needs: update-versions
steps:
- name: Generate app token
id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.UPDATE_VERSIONS_CLIENT_ID }}
private-key: ${{ secrets.UPDATE_VERSIONS_PRIVATE_KEY }}
- name: Checkout Colvars repo in full
uses: actions/checkout@v7
with:
ref: master
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
- name: Checkout Wiki repo
uses: actions/checkout@v7
with:
repository: 'Colvars/colvars.wiki'
path: 'wiki'
token: ${{ steps.app-token.outputs.token }}
- name: Update Wiki page that lists Colvars versions
run: |
git config --global user.email "noreply@github.com"
git config --global user.name "CI runner"
git fetch --all
bash doc/print_engine_versions.sh > wiki/List-of-Colvars-versions-included-in-simulation-and-analysis-packages.md
if ! git -C wiki diff --quiet ; then
git -C wiki add List-of-Colvars-versions-included-in-simulation-and-analysis-packages.md
git -C wiki commit -m "Update list of Colvars versions"
git -C wiki push origin master
fi
- name: Set up GitHub CLI
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
gh auth status
- name: Update "Colvars release notes" Wiki page
run: |
./devel-tools/print_pr_list.py --format notes > wiki/Colvars-release-notes.md
if ! git -C wiki diff --quiet ; then
git -C wiki add Colvars-release-notes.md
git -C wiki commit -m "Update Colvars release notes"
git -C wiki push origin master
fi
update-doc:
name: Update documentation
if: contains(github.event.head_commit.message, '[update-doc]')
runs-on: ubuntu-latest
needs: update-versions
container:
image: ghcr.io/colvars/devel-containers:Fedora45-devel-x86_64
options: --user 1001:1001
steps:
- name: Generate app token
id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.UPDATE_VERSIONS_CLIENT_ID }}
private-key: ${{ secrets.UPDATE_VERSIONS_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: colvars.github.io
permission-contents: write
- name: Checkout Colvars repo
uses: actions/checkout@v7
- name: Checkout website repo
uses: actions/checkout@v7
with:
token: ${{ steps.app-token.outputs.token }}
repository: 'Colvars/colvars.github.io'
path: 'website'
- name: Build documentation
working-directory: doc
run: |
make clean-all
make
- name: Push updated doc to website repository
working-directory: doc
env:
COLVARS_WEBSITE_TREE: ${{ github.workspace }}/website
COLVARS_WEBSITE_REPO: https://github.com/Colvars/colvars.github.io
run: |
make install
export GIT_SSH="ssh -i ~/.ssh/website"
git config --global user.email "noreply@github.com"
git config --global user.name "CI runner"
bash update_website.sh ${COLVARS_WEBSITE_TREE}