-
Notifications
You must be signed in to change notification settings - Fork 180
42 lines (40 loc) · 1.23 KB
/
drop-staging.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
name: drop-staging
on:
workflow_run:
workflows:
- pull-request-closed-hook
branches-ignore:
- main
- release*
types:
- completed
jobs:
drop-stage:
name: "Drop from staging"
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/github-script@v3
id: get-pr-number
with:
result-encoding: string
script: |
const { data: resp } = await github.actions.listJobsForWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ github.event.workflow_run.id }}
})
return resp.jobs[0].steps[1].name
- uses: actions/checkout@v2
with:
ref: gh-actions
path: gh-actions
- uses: ./gh-actions/actions/destroy-distribution-by-name
with:
api-token: ${{ secrets.DEPLOYGATE_API_TOKEN }}
app-owner-name: droidkaigi
platform: android
app-id: io.github.droidkaigi.feeder.debug
distribution-name: ${{ format('debug/refs/pull/{0}/head', steps.get-pr-number.outputs.result) }}