Skip to content

Bump MW

Bump MW #36

name: Bump MW
on:
repository_dispatch:
types: [bump-mediawiki]
workflow_dispatch:
inputs:
tag:
type: string
jobs:
bump-mediawiki:
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/mediawiki:${{fromJSON(steps.vars.outputs.result).tag}}"'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{secrets.BOT_TOKEN}}
commit-message: Bump mediawiki docker image
title: Bump MediaWiki 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}}