Skip to content

feat: extract workflow #1

feat: extract workflow

feat: extract workflow #1

Workflow file for this run

# this action is used by sub-repos
on:
workflow_call:
inputs:
owner:
required: true
type: string
sha:
required: true
type: string
branch:
required: true
type: string
repo:
required: true
type: string
secrets:
GITHUB_TOKEN:

Check failure on line 18 in .github/workflows/healthcheck.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/healthcheck.yml

Invalid workflow file

secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
required: true
PERSONAL_TOKEN:
required: true
jobs:
trigger-healthckeck:
runs-on: ubuntu-latest
steps:
- uses: octokit/[email protected]
name: Create check run
id: create_check_run
with:
route: POST /repos/{owner}/{repo}/check-runs
owner: ${{ inputs.owner }}
repo: ${{ inputs.repo }}
name: DevHub
head_sha: ${{ inputs.sha }}
output: |
title: Developer Portal healthcheck
summary: Building the project in DevHub (Developer Portal)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Validate check run
if: ${{ !fromJson(steps.create_check_run.outputs.data).id }}
run: exit 1
- uses: octokit/[email protected]
name: Trigger workflow
id: trigger_workflow
if: ${{ fromJson(steps.create_check_run.outputs.data).id }}
with:
route: POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
owner: shopware
repo: developer-portal
ref: main
workflow_id: external-healthcheck.yml
inputs: |
branch: ${{ inputs.branch }}
repo: ${{ inputs.repo }}
sha: ${{ inputs.sha }}
check: "${{ fromJson(steps.create_check_run.outputs.data).id }}"
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}