Skip to content

Commit bc8aef7

Browse files
committed
Add automatic demo update on latest tag builds
- Modify build workflow to trigger demo update when 'tag as latest' is enabled - Update demo workflow to listen for repository dispatch events - Demo updates automatically after successful latest tag builds
1 parent 35c1efa commit bc8aef7

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/docker-build.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,13 @@ jobs:
7676
tags: ${{ steps.meta.outputs.tags }}
7777
labels: ${{ steps.meta.outputs.labels }}
7878
build-args: |
79-
VERSION=${{ steps.version-tag.outputs.tag }}
79+
VERSION=${{ steps.version-tag.outputs.tag }}
80+
81+
- name: Trigger demo update
82+
if: inputs.tag_as_latest == true
83+
run: |
84+
curl -X POST \
85+
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
86+
-H "Accept: application/vnd.github.v3+json" \
87+
https://api.github.com/repos/${{ github.repository }}/dispatches \
88+
-d '{"event_type": "deploy-demo"}'

.github/workflows/update-demo.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Update Live Demo
22

33
on:
44
workflow_dispatch:
5+
repository_dispatch:
6+
types: [deploy-demo]
57

68
jobs:
79
deploy:

0 commit comments

Comments
 (0)