-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (35 loc) · 1.26 KB
/
create-review-apps.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
name: Create review apps
on:
pull_request:
types: [opened, reopened]
concurrency:
cancel-in-progress: true
group: create-review-apps-scalingo-${{ github.ref }}
jobs:
scalingo-link:
name: Create and link Scalingo review apps
runs-on: ubuntu-latest
# run only for local PRs, since we need secrets access anyway
if: github.event.pull_request.head.repo.id == github.event.pull_request.base.repo.id
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Scalingo CLI
uses: ./.github/actions/scalingo-cli
- name: Run creation script
env:
SCALINGO_API_TOKEN: ${{ secrets.SCALINGO_API_TOKEN }}
run: |
./scripts/create-review-apps.sh "${{ github.event.number }}"
add-pull-request-comment:
name: Add review app URL to Pull Request
runs-on: ubuntu-latest
needs: [scalingo-link]
steps:
- name: Add review app URL
uses: thollander/actions-comment-pull-request@a78d1ddb11c87ee75a43e5c7697e2feeabc32718
with:
pr_number: ${{ github.event.number }}
message: |
La _review app_ a été déployée : https://cdb-app-review-pr${{ github.event.number }}.osc-fr1.scalingo.io.
comment_tag: reviewapp