-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (61 loc) · 2.27 KB
/
pull-upstream.yml
File metadata and controls
72 lines (61 loc) · 2.27 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: pull-upstream
on:
push:
branches:
- develop
jobs:
pull_upstream:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [16]
steps:
- name: Checkout 🛎
uses: actions/checkout@master
# @TODO - Move this to after the git diff so it's only done if there's
# any changes to pull in. That will also require stashing of the
# changes, so the site can install before being upgraded.
- name: Setup ddev
uses: jonaseberle/github-action-setup-ddev@v1
with:
autostart: false
- name: Start ddev 👨🏻💻
run: cd drupal && ddev start
- name: Install Drupal 👨🏻💻
run: cd drupal && ddev composer install && ddev drush -y tome:install
- name: Checkout Upstream (realityloop/foundry) 🛎
uses: actions/checkout@master
with:
repository: realityloop/foundry
ref: develop
path: upstream
- name: Copy config from upstream
run: rm -rf drupal/config/sync && cp -rf upstream/config/sync drupal/config/sync
- name: Copy composer.* from upstream
run: cp upstream/composer.* drupal
- name: Cleanup upstream
run: rm -rf upstream
# - run: git diff # @todo: exit-code 0 if no diff
- name: Update from upstream 👨🏻💻
run: cd drupal && ddev composer install && ddev drush updb -y && ddev drush cim -y
- name: Tome export 👨🏻💻
run: cd drupal && ddev drush -y en tome_sync && ddev drush -y tome:export
- run: git diff && git status
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
base: develop
body: ''
branch: upstream
commit-message: "chore: update from upstream"
delete-branch: true
title: "chore: update from upstream"
- name: Pull Request output
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1