-
Notifications
You must be signed in to change notification settings - Fork 8
56 lines (50 loc) · 1.5 KB
/
update-config.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
on:
workflow_dispatch:
repository_dispatch:
types: [config_change]
name: Update config
jobs:
update-config:
runs-on: ubuntu-latest
container:
image: ghcr.io/city-of-helsinki/drupal-php-docker:8.2-alpine
services:
db:
image: mariadb
env:
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
MYSQL_DATABASE: drupal
MYSQL_ROOT_PASSWORD: drupal
ports:
- 3306:3306
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Download latest dump
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh run download -n latest.sql
- name: Build project
run: |
composer install --no-interaction
$(drush sql:connect) < latest.sql
drush cim -y && drush updb -y && drush cr
composer update drupal/helfi_* drupal/hdbt* -W --no-interaction
drush cr && drush updb -y && drush cex -y
# Update platform
drush helfi:tools:update-platform
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
committer: GitHub <[email protected]>
author: actions-bot <[email protected]>
commit-message: Update configuration
title: Automatic update
labels: auto-update
body: |
- Updated active configuration.
- Updated platform
branch: update-configuration