Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main workflows #16

Merged
merged 11 commits into from
Nov 29, 2023
8 changes: 7 additions & 1 deletion .github/workflows/status-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Status Check Workflow

on: workflow_call
on:
workflow_dispatch:
inputs:
psha:
required: true

jobs:
build:
Expand All @@ -9,6 +13,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ inputs.psha }}

- name: Set Xcode Version
run: sudo xcode-select -s /Applications/Xcode_15.0.app
Expand Down
28 changes: 25 additions & 3 deletions .github/workflows/statuscheck-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,31 @@ jobs:
echo "The comment content contains the specified text. Continuing with further actions."
echo "::set-output name=shouldc::true"
fi
call-check-workflow:
name: Run
get-head-sha:
name: Get Pull Request Head SHA
needs: checkif
if: ${{ needs.checkif.outputs.shouldc == 'true' }}
uses: Darock-Studio/Darock-Bili/.github/workflows/status-check.yml@main
runs-on: ubuntu-latest
outputs:
psha: ${{ steps.getsha.outputs.psha }}
env:
slink: ${{ github.event.issue.pull_request.url }}
steps:
- name: Get SHA
id: getsha
run: |
json_data=$(curl -s "$slink")
sha=$(echo "$json_data" | jq -r '.head.ref')
echo "psha=$sha" >> $GITHUB_OUTPUT
call-check-workflow:
name: Call Check Overflow
needs: get-head-sha
runs-on: ubuntu-latest
steps:
- name: Call
uses: benc-uk/workflow-dispatch@v1
with:
workflow: status-check.yml
ref: ${{ needs.get-head-sha.outputs.psha }}
inputs: '{ "psha": "${{ needs.get-head-sha.outputs.psha }}"}'

Loading