Skip to content

[Don't merge] test_stage_pr_workflow1 #1

[Don't merge] test_stage_pr_workflow1

[Don't merge] test_stage_pr_workflow1 #1

Workflow file for this run

name: drop-staging
on:
workflow_run:
workflows:
- pull-request-closed-hook
branches-ignore:
- main
- release*
types:
- completed
# Disable all permissions. We have to enable required permissions at job-level.
permissions: {}
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'
permissions:
actions: read # for listJobsForWorkflowRun
contents: read # for checkout
steps:
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
id: get-pr-number
with:
result-encoding: string
script: |
const { data: resp } = await github.rest.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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
repository: droidkaigi/conference-app-2023
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.confsched2023.dev
distribution-name: ${{ format('debug/refs/pull/{0}/head', steps.get-pr-number.outputs.result) }}