-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (67 loc) · 2.43 KB
/
drupal-regression.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
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
name: 'Drupal Regression'
on:
workflow_call:
inputs:
PLATFORMSH_ID:
required: true
type: string
WORK_DIR:
type: string
default: './drupal-regression'
secrets:
PLATFORMSH_KEY:
required: true
jobs:
drupal-regression:
runs-on: ubuntu-latest
steps:
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: drupal-regression
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
:robot: :speech_balloon: `checking for drupal-regression - this can take a few minutes..`
edit-mode: replace
reactions: ${{ steps.drupal-regression.outputs.reactions }}
- uses: actions/checkout@v1
- uses: reload/action-platformsh-url@main
id: platformsh_url
with:
PLATFORMSH_ID: ${{ inputs.PLATFORMSH_ID }}
PLATFORMSH_KEY: ${{ secrets.PLATFORMSH_KEY }}
- name: Drupal Regression
id: drupal-regression
uses: reload/action-drupal-regression@main
with:
url: ${{ steps.platformsh_url.outputs.url }}
work_dir: ${{ inputs.WORK_DIR }}
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc2
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: drupal-regression
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.fc2.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
${{ steps.drupal-regression.outputs.message }}
edit-mode: replace
reactions: ${{ steps.drupal-regression.outputs.reactions }}
- name: Check for regression fail
if: ${{ steps.drupal-regression.outputs.status == 'fail' }}
uses: actions/github-script@v6
with:
script: |
core.setFailed('Drupal Regression failed. Differences found between codebase and environment. See the comment added to the PR, or the log for details.')