Skip to content

Build artifacts

Build artifacts #199

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.3-alpine
services:
db:
image: mysql:8
env:
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
MYSQL_DATABASE: drupal
MYSQL_ROOT_PASSWORD: drupal
ports:
- 3306:3306
steps:
- uses: actions/checkout@v4
- 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@v4
with:
name: latest.sql
path: latest.sql
retention-days: 10