generated from meshery/meshery
-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (61 loc) · 1.96 KB
/
go-mod-sync.yaml
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
name: Meshery extensions go.mod sync
on:
push:
branches:
- "master"
paths:
- "go.mod"
jobs:
sync:
name: sync
runs-on: ubuntu-22.04
steps:
- name: check out code for meshery
uses: actions/checkout@master
with:
repository: meshery/meshery
token: ${{ secrets.RELEASEDRAFTER_PAT }}
path: meshery
- name: Check out code for meshery-extensions
uses: actions/checkout@master
with:
repository: layer5labs/meshery-extensions
token: ${{ secrets.RELEASEDRAFTER_PAT }}
path: meshery-extensions
- name: Setup Go
uses: actions/setup-go@master
with:
go-version: '1.19'
- name: Go mod sync utility
run: cd meshery-extensions;make graphql-sync;
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
repository: meshery-extensions
commit_user_name: l5io
commit_user_email: ci@layer5.io
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
commit_options: '--signoff'
commit_message: 'Upgrading go.mod in response to meshery/meshery'
branch: master
notify-via-email:
runs-on: ubuntu-latest
needs:
- sync
if: ${{ always() && contains(needs.*.result, 'failure') }}
steps:
- name: Send email notification on failure
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: Go Mod Sync Failed - ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }}
to: support@layer5.io
from: Meshery extensions go.mod sync workflow
body: |
The workflow failed. Here are the details:
Job: ${{ job.status }}
Job Name: ${{ job.job_name }}
Error: ${{ job.steps[*].outcome }}