config_change #674
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [config_change] | |
name: Update config | |
env: | |
SIMPLETEST_BASE_URL: "http://127.0.0.1:8080" | |
SIMPLETEST_DB: "mysql://drupal:drupal@db:3306/drupal" | |
XDEBUG_MODE: off | |
jobs: | |
update-config: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/city-of-helsinki/drupal-php-docker:8.1-alpine | |
services: | |
db: | |
image: mariadb:10.7 | |
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 | |
$(drush sql:connect) < latest.sql | |
drush cr && drush cim -y | |
composer update drupal/helfi_* drupal/hdbt* -W | |
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 |