Skip to content

Commit

Permalink
feat: add developer-portal workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
bojanrajh committed Feb 21, 2024
1 parent 10278c2 commit 5435d13
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/deploy-developer-portal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This workflow is triggered whenever the main branch is updated.
name: Deploy to DevHub

on:
push:
branches:
- main

jobs:
trigger-deployment:
name: Trigger deployment
runs-on: ubuntu-latest
steps:
- uses: octokit/[email protected]
name: Trigger deployment
with:
route: POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
owner: shopware
repo: developer-portal
ref: main
workflow_id: checkout-test-build-deploy.yml
env:
GITHUB_TOKEN: ${{ secrets.DEV_HUB_PERSONAL_ACCESS_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/developer-portal-healthcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This workflow triggers a Healthcheck workflow in developer-portal for every PR targeting main branch.
name: Healthcheck

on:
pull_request:
branches:
- main

jobs:
create-healthcheck:
uses: shopware/developer-portal/.github/workflows/healthcheck.yml@main
with:
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
branch: ${{ github.event.pull_request.head.ref }}
sha: ${{ github.event.pull_request.head.sha }}
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_TOKEN: ${{ secrets.DEV_HUB_PERSONAL_ACCESS_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/update-healthcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow is triggered from developer-portal and updates the healthcheck status in the PR.
name: Update healthcheck

on:
workflow_dispatch:
inputs:
owner:
description: "Owner to checkout"
required: true
type: string
repo:
description: "Repo to checkout"
required: true
type: string
check:
description: "Check ID"
required: true
type: string
conclusion:
description: "Healthcheck conclusion"
required: true
type: string
run_id:
description: "Workflow run ID"
required: true
type: string

jobs:
update-healthcheck:
uses: shopware/developer-portal/.github/workflows/update-healthcheck.yml@main
with:
owner: ${{ inputs.owner }}
repo: ${{ inputs.repo }}
check: ${{ inputs.check }}
conclusion: ${{ inputs.conclusion }}
run_id: ${{ inputs.run_id }}
secrets:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules/
.turbo
.env
chrome/
chrome/

0 comments on commit 5435d13

Please sign in to comment.