-
-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (49 loc) · 1.71 KB
/
bump-mediawiki.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
name: Bump MW
on:
repository_dispatch:
types: [bump-femiwiki]
workflow_dispatch:
inputs:
tag:
type: string
jobs:
bump-femiwiki:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: actions/github-script@v7
id: vars
with:
script: |
return {
tag: '${{github.event.client_payload.tag}}' || '${{github.event.inputs.tag}}',
}
- run: |
mkdir ~/hcledit
cd ~/hcledit
curl -L https://github.com/minamijoyo/hcledit/releases/download/v${HCLEDIT_VERSION}/hcledit_${HCLEDIT_VERSION}_linux_amd64.tar.gz | tar -xz
sudo install hcledit /usr/local/bin
env:
HCLEDIT_VERSION: '0.2.6'
- name: Edit HCL
run: |
cd jobs
hcledit attribute set -f fastcgi.nomad \
-u job.fastcgi.group.fastcgi.task.fastcgi.config.image \
'"ghcr.io/femiwiki/femiwiki:${{fromJSON(steps.vars.outputs.result).tag}}"'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{secrets.BOT_TOKEN}}
commit-message: Bump femiwiki docker image
title: Bump femiwiki docker image
body: |
### pre-merge
- [ ] The checksums are verified.
- [ ] The `MEDIAWIKI_SKIP_UPDATE` environment variable is set correctly.
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
branch: deploy-bump-mw-${{fromJSON(steps.vars.outputs.result).tag}}