forked from streamx-dev/demo-puresight-eds
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebresource-publish-to-streamx.yaml
More file actions
81 lines (73 loc) · 2.76 KB
/
Copy pathwebresource-publish-to-streamx.yaml
File metadata and controls
81 lines (73 loc) · 2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Sync web resources with StreamX
on:
workflow_dispatch:
inputs:
publish_all_webresources:
description: "Publish all, pattern included webresources to StreamX"
required: false
type: boolean
default: false
pull_request:
types:
- closed
branches:
- main
permissions:
id-token: write
contents: read
jobs:
sync-pr-with-streamx:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v2'
with:
workload_identity_provider: ${{ secrets.GCP_STREAMX_RELEASES_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_STREAMX_RELEASES_SNAPSHOT_READ_SA }}
token_format: access_token
- name: Run sync with StreamX
uses: streamx-dev/streamx-common-github-actions/.github/actions/connector-github@v1
env:
STREAMX_CONNECTION_SOCKET_TIMEOUT: 3000
with:
action: sync
channel: web-resources
source-provider: PullRequestDiffSourceProvider
type: 'web-resource/static'
include-patterns: ${{ vars.STREAMX_INGESTION_INCLUDES }}
streamx-ingestion-token: ${{ secrets.STREAMX_INGESTION_GH_TOKEN }}
streamx-ingestion-url: ${{ vars.STREAMX_INGESTION_URL }}
snapshot-artifactory-token: ${{ steps.auth.outputs.access_token }}
sync-all-with-streamx:
if: github.event_name == 'workflow_dispatch' && inputs.publish_all_webresources == true
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v2'
with:
workload_identity_provider: ${{ secrets.GCP_STREAMX_RELEASES_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_STREAMX_RELEASES_SNAPSHOT_READ_SA }}
token_format: access_token
- name: Run full sync with StreamX
uses: streamx-dev/streamx-common-github-actions/.github/actions/connector-github@v1
env:
STREAMX_CONNECTION_SOCKET_TIMEOUT: 3000
with:
action: publish
channel: web-resources
source-provider: BatchSourceProvider
workspace: ${{ github.workspace }}
type: 'web-resource/static'
include-patterns: ${{ vars.STREAMX_INGESTION_INCLUDES }}
streamx-ingestion-token: ${{ secrets.STREAMX_INGESTION_GH_TOKEN }}
streamx-ingestion-url: ${{ vars.STREAMX_INGESTION_URL }}
snapshot-artifactory-token: ${{ steps.auth.outputs.access_token }}