-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (38 loc) · 1 KB
/
artifact.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
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