mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2026-09-03 03:50:02 +03:00
58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
YAML
name: Workflow Run
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows:
|
|
- Pull Request
|
|
types:
|
|
- completed
|
|
|
|
jobs:
|
|
metadata:
|
|
name: Metadata
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
pr_number: ${{ steps.pr_number.outputs.pr_number }}
|
|
steps:
|
|
- name: Get Pull Request Number
|
|
id: pr_number
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
|
|
run: |
|
|
echo pr_number=$(gh api "repos/${GITHUB_REPOSITORY}/commits/${HEAD_SHA}/pulls" --jq 'map(select(.state == "open")) | .[0].number') >> "${GITHUB_OUTPUT}"
|
|
|
|
automation:
|
|
name: Automation
|
|
uses: ./.github/workflows/__automation.yml
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
secrets:
|
|
JF_BOT_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
|
|
|
|
deploy:
|
|
name: Deploy
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
uses: ./.github/workflows/__deploy.yml
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
deployments: write
|
|
secrets:
|
|
JF_BOT_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
|
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
needs:
|
|
- metadata
|
|
with:
|
|
branch: ${{ format('{0}/{1}', github.event.workflow_run.head_repository.full_name, github.event.workflow_run.head_branch) }}
|
|
commit: ${{ github.event.workflow_run.head_sha }}
|
|
workflow_run_id: ${{ github.event.workflow_run.id }}
|
|
pr_number: ${{ needs.metadata.outputs.pr_number }}
|