forked from meshery/meshery
-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (118 loc) · 5.11 KB
/
integrations-updater.yml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Meshery Integrations Updater
on:
push:
branches:
- "master"
paths:
- ".github/workflows/integrations-updater.yml"
schedule:
- cron: "0 0 * * *" # Run the job every day at midnight
workflow_dispatch:
# This workflow uses the service account: meshery-integrations-sheet@meshery-237716.iam.gserviceaccount.com
# See these instructions for setup - https://theoephraim.github.io/node-google-spreadsheet/#/getting-started/authentication
jobs:
integrations:
if: github.repository == 'meshery/meshery'
runs-on: ubuntu-22.04
# outputs:
# output1: ${{ steps.step1.outputs.test }}
# output2: ${{ steps.step2.outputs.test }}
steps:
- name: Checkout Meshery repo
uses: actions/checkout@master
with:
path: meshery
token: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Checkout Layer5.io repo
uses: actions/checkout@master
with:
repository: layer5io/layer5
token: ${{ secrets.GH_ACCESS_TOKEN }}
path: layer5
- name: Checkout Meshery.io repo
uses: actions/checkout@master
with:
repository: meshery/meshery.io
token: ${{ secrets.GH_ACCESS_TOKEN }}
path: meshery.io
- name: Checkout cloud repo
uses: actions/checkout@master
with:
repository: layer5io/meshery-cloud
token: ${{ secrets.GH_ACCESS_TOKEN }}
path: meshery-cloud
- name: Build mesheryctl
working-directory: ./meshery/mesheryctl
run: |
make;
- name: Pubish to meshery.io site
working-directory: ./meshery/mesheryctl
run: |
./mesheryctl registry publish website ${{ secrets.INTEGRATION_SPREADSHEET_CRED }} 1DZHnzxYWOlJ69Oguz4LkRVTFM79kC2tuvdwizOJmeMw ../meshery.io/integrations ../meshery.io/assets/images/integration -o js
- name: Pubish to layer5.io site
working-directory: ./meshery/mesheryctl
run: |
./mesheryctl registry publish website ${{ secrets.INTEGRATION_SPREADSHEET_CRED }} 1DZHnzxYWOlJ69Oguz4LkRVTFM79kC2tuvdwizOJmeMw ../layer5/src/collections/integrations ../layer5/src/collections/integrations -o mdx
- name: Pubish to Meshery docs
working-directory: ./meshery/mesheryctl
run: |
./mesheryctl registry publish website ${{ secrets.INTEGRATION_SPREADSHEET_CRED }} 1DZHnzxYWOlJ69Oguz4LkRVTFM79kC2tuvdwizOJmeMw docs/_models docs/assets/img/integrations -o md
- name: Pubish to Meshery docs
working-directory: ./meshery/mesheryctl
run: |
./mesheryctl registry publish remote-provider ${{ secrets.INTEGRATION_SPREADSHEET_CRED }} 1DZHnzxYWOlJ69Oguz4LkRVTFM79kC2tuvdwizOJmeMw ../meshery-cloud/meshmodels/models ../meshery-cloud/ui/public/img/meshmodels
- name: Commit changes to Layer5.io repo
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: l5io
repository: ./layer5
commit_user_email: [email protected]
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
commit_options: "--signoff"
commit_message: "[Docs] Generated documentation for Integration"
branch: master
- name: Commit changes to Meshery.io repo
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: l5io
repository: ./meshery.io
commit_user_email: [email protected]
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
commit_options: "--signoff"
commit_message: "[Docs] Generated documentation for Integration"
branch: master
- name: Commit changes to Meshery repo
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: l5io
repository: ./meshery
commit_user_email: [email protected]
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
commit_options: "--signoff"
commit_message: "[Docs] Generated documentation for Integration"
branch: master
- name: Commit changes to Cloud
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: l5io
repository: ./meshery-cloud
commit_user_email: [email protected]
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
commit_options: "--signoff"
commit_message: "Models Updated"
branch: master
- name: Send Email on Model Publish Failure
if: failure()
uses: dawidd6/[email protected]
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: GitHub Actions - Workflow Failure
from: |
"Model Updater" <[email protected]>
body: |
The GitHub Actions workflow in ${{ github.repository }} has failed.
You can find more details in the GitHub Actions log ${{ github.workflow }}.