External healthcheck #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: External healthcheck | |
on: | |
#workflow_run: | |
# workflows: | |
# - "Healthcheck" | |
# types: | |
# - completed | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: "Branch to checkout" | |
required: true | |
type: string | |
repo: | |
description: "Repo to checkout" | |
required: true | |
type: string | |
sha: | |
description: "Commit to checkout" | |
required: true | |
type: string | |
jobs: | |
vars: | |
runs-on: ubuntu-latest | |
outputs: | |
DEV_HUB_REPO: ${{ secrets.DEV_HUB_REPO }} | |
DEV_HUB_BRANCH: ${{ secrets.DEV_HUB_BRANCH }} | |
steps: | |
- run: echo "Exposing env vars" | |
update-status: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check outcome | |
id: outcome | |
run: echo "::set-output name=outcome::${{ toJson(needs.workflow_run.conclusion == 'success') }}" | |
- name: Update Workflow Status | |
uses: octokit/[email protected] | |
with: | |
route: POST /repos/:owner/:repo/check-runs/:check_run_id | |
owner: shopware | |
repo: docs | |
check_run_id: ${{ github.event.workflow_run.id }} | |
name: Your Check Name | |
status: ${{ steps.outcome.outputs.outcome == 'true' && 'completed' || 'completed' }} | |
conclusion: ${{ steps.outcome.outputs.outcome == 'true' && 'success' || 'failure' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |