Skip to content

Commit c1f1a70

Browse files
committed
Add auto build
1 parent 8d69929 commit c1f1a70

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: "Trigger webhook"
2+
description: "Send a POST request to a webhook URL"
3+
4+
inputs:
5+
webhook_url:
6+
description: "Webhook endpoint URL"
7+
required: true
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
- name: Validate webhook URL input
13+
shell: bash
14+
run: |
15+
if [ -z "${{ inputs.webhook_url }}" ]; then
16+
echo "Missing required input: webhook_url"
17+
exit 1
18+
fi
19+
20+
- name: Send webhook POST request
21+
shell: bash
22+
run: |
23+
curl --fail --show-error --silent \
24+
--request POST \
25+
"${{ inputs.webhook_url }}"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Trigger OpenShift Auto Builds
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
trigger_build_webhooks:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Trigger backend build webhook
14+
uses: ./.github/actions/trigger-webhook
15+
with:
16+
webhook_url: ${{ secrets.OPENSHIFT_BACKEND_WEBHOOK_URL }}
17+
18+
- name: Trigger frontend build webhook
19+
uses: ./.github/actions/trigger-webhook
20+
with:
21+
webhook_url: ${{ secrets.OPENSHIFT_FRONTEND_WEBHOOK_URL }}

0 commit comments

Comments
 (0)