Skip to content

Build artifacts

Build artifacts #104

Workflow file for this run

on:
workflow_dispatch:
repository_dispatch:
types: [ build_artifact ]
schedule:
- cron: '0 0 * * 0'
name: Build artifacts
jobs:
build:
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: Build project
run: composer install --no-interaction
- name: Setup drupal and save database dump
run: |
drush si -y && drush cr && drush si --existing-config -y && drush cim -y
drush sql-dump --result-file=${GITHUB_WORKSPACE}/latest.sql
- name: Upload latest database dump
uses: actions/upload-artifact@v3
with:
name: latest.sql
path: latest.sql
retention-days: 10