This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
forked from aaimio/deriv-app-id-action
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 2.12 KB
/
example.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
name: Deriv App ID Generator
on:
issue_comment:
types: [edited]
jobs:
generate_app_id:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Capture Vercel preview URL
id: vercel_preview_url
uses: binary-com/vercel-preview-url-action@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Deriv App ID for deployment Preview URL
id: generate_app_id
uses: binary-com/deriv-app-id-action@master
with:
DERIV_API_TOKEN: ${{ secrets.DERIV_API_TOKEN }}
DERIV_APP_ID: ${{ secrets.DERIV_APP_ID }},
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
max_retries: 5
vercel_preview_url: ${{ steps.vercel_preview_url.outputs.vercel_preview_url }}
- name: Comment on pull request with App ID and URLs
id: sticky_comment_on_pr
if: steps.generate_app_id.outputs.should_post_comment
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
header: deriv-app-id-action
number: ${{github.event.issue.number}}
message: |
A production App ID was automatically generated for this PR. ([log](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}))
- **PR**: [${{ steps.generate_app_id.outputs.pr_url }}](${{ steps.generate_app_id.outputs.pr_url }})
- **URL**: [${{ steps.vercel_preview_url.outputs.vercel_preview_url }}](${{ steps.vercel_preview_url.outputs.vercel_preview_url }})
- **App ID**: `${{ steps.generate_app_id.outputs.app_id }}`
<details>
<summary>Copy/paste snippet</summary>
```
- **PR**: [${{ steps.generate_app_id.outputs.pr_url }}](${{ steps.generate_app_id.outputs.pr_url }})
- **URL**: [${{ steps.vercel_preview_url.outputs.vercel_preview_url }}](${{ steps.vercel_preview_url.outputs.vercel_preview_url }})
- **App ID**: `${{ steps.generate_app_id.outputs.app_id }}`
```
</details>