-
Notifications
You must be signed in to change notification settings - Fork 39
54 lines (54 loc) · 2.52 KB
/
copy_config_to_devops.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
name: Automated PR to DEVOPS
on:
push:
branches:
- main
paths:
- 'devtools/chain/default.db-options'
- 'devtools/chain/specs/multi_nodes'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Git checkout devops
uses: actions/checkout@v4
with:
repository: axonweb3/axon-devops
ref: 32e274a1f14c065fe63d37f006ac1a3c4f70654f
path: ${{ github.workspace}}/axon-devops
- name: apply config toml config_toml.patch
run: |
# copy default.db-options & specs/multi_nodes to axon-devops always
cp ${{ github.workspace}}/devtools/chain/default.db-options ${{ github.workspace}}/axon-devops/deploy/templates
cp ${{ github.workspace}}/devtools/chain/default.db-options ${{ github.workspace}}/axon-devops/docker-deploy/devtools/chain
cp ${{ github.workspace}}/devtools/chain/default.db-options ${{ github.workspace}}/axon-devops/k8s-deploy/k8s/axon/axon-config
cp -r ${{ github.workspace}}/devtools/chain/nodes/specs/multi_nodes ${{ github.workspace}}/axon-devops/deploy/templates/specs
cp -r ${{ github.workspace}}/devtools/chain/nodes/specs/multi_nodes ${{ github.workspace}}/axon-devops/docker-deploy/devtools/chain/specs
cp -r ${{ github.workspace}}/devtools/chain/nodes/specs/multi_nodes ${{ github.workspace}}/axon-devops/k8s-deploy/k8s/axon/axon-config/specs
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.TOKEN }}
path: ${{ github.workspace}}/axon-devops
signoff: false
commit-message: "feat: automated pr to change config files"
branch: bot-${{ github.repository }}
title: "feat: automated pr to change config files"
body: "Automated pr to changes config files by GitHub action"
- name: Send some mail
if: failure()
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.163.com
server_port: 465
secure: true
username: ${{secrets.MAIL_USERNAME}}
password: ${{secrets.MAIL_PASSWORD}}
subject: Workflow finished
body: ${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }},please have a check:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
from: me