mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2026-09-03 03:50:02 +03:00
add success condition and use sha for metadata job
This commit is contained in:
@@ -61,7 +61,7 @@ jobs:
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: pages deploy dist --project-name=jellyfin-web --branch=${{ inputs.branch }}
|
||||
command: pages deploy dist --project-name=jellyfin-web --branch="${{ inputs.branch }}"
|
||||
|
||||
compose-comment:
|
||||
name: Compose and push comment 📝
|
||||
|
||||
@@ -14,6 +14,7 @@ on:
|
||||
jobs:
|
||||
metadata:
|
||||
name: Metadata
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
pr_number: ${{ steps.pr_number.outputs.pr_number }}
|
||||
@@ -22,9 +23,9 @@ jobs:
|
||||
id: pr_number
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
|
||||
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
|
||||
run: |
|
||||
echo "pr_number=$(gh pr list --repo "${GITHUB_REPOSITORY}" --head "${HEAD_BRANCH}" --json number --jq '.[0].number')" >> "${GITHUB_OUTPUT}"
|
||||
echo pr_number=$(gh api "repos/${GITHUB_REPOSITORY}/commits/${HEAD_SHA}/pulls" --jq 'map(select(.state == "open")) | .[0].number') >> "${GITHUB_OUTPUT}"
|
||||
|
||||
automation:
|
||||
name: Automation
|
||||
@@ -37,6 +38,7 @@ jobs:
|
||||
|
||||
deploy:
|
||||
name: Deploy
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
uses: ./.github/workflows/__deploy.yml
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
Reference in New Issue
Block a user