Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trigger chimney git-action on config change #1165

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/config-change-0helm-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
path: ./0helm
token: ${{ secrets.ACCESS_TOKEN }}

- name: "Copy 0chain.yaml and sc.yaml in 0helm one-pool-staging-test branch"
- name: "Copy 0chain_blobber.yaml and 0chain_validator.yaml in 0helm one-pool-staging-test branch"
if: ${{ contains(steps.changed-files.outputs.modified_files, 'config/0chain_blobber.yaml') || contains(steps.changed-files.outputs.modified_files, 'config/0chain_validator.yaml') }}
run: |
touch 0helm/updated_configs/0chain_blobber.yaml
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/config-change-chimney-scriipt-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: TRIGGER CHIMNEY SCRIPT ON CONFIG CHANGE

# on:
# push:
# branches:
# - staging
# paths:
# - config/0chain_blobber.yaml
# - config/0chain_validator.yaml

# pull_request:
# branches:
# - staging
# types:
# - closed
# paths:
# - config/0chain_blobber.yaml
# - config/0chain_validator.yaml
on:
push:
branches:
- update/chimney-script
paths:
- config/0chain_blobber.yaml
- config/0chain_validator.yaml

# pull_request:
# branches:
# - staging
# types:
# - closed
# paths:
# - config/0chain_blobber.yaml
# - config/0chain_validator.yaml

# jobs:
# RunChimneyConfigChange:
# runs-on: 'arc-runner'
# steps:
# - uses: actions/checkout@v3

# - name: Trigger git-action in zcnwebappscripts repo
# run: |
# curl -X POST \
# -H "Authorization: Bearer ${{secrets.ACCESS_TOKEN}}" \
# -H "Accept: application/vnd.github.v3+json" \
# https://api.github.com/repos/0chain/zcnwebappscripts/actions/workflows/chimney-script-config-change-pr.yaml/dispatches \
# -d '{"ref": "main"}'

jobs:
RunChimneyConfigChange:
runs-on: 'arc-runner'
steps:
- uses: actions/checkout@v3

- name: Trigger git-action in zcnwebappscripts repo
run: |
curl -X POST \
-H "Authorization: Bearer ${{secrets.ACCESS_TOKEN}}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/0chain/zcnwebappscripts/actions/workflows/chimney-script-config-change-pr.yaml/dispatches \
-d '{"ref": "feature/config-ci"}'
2 changes: 1 addition & 1 deletion config/0chain_blobber.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: "1.0"

# for testing
logging:
level: "info"
console: true # printing log to console is only supported in development mode
Expand Down
2 changes: 1 addition & 1 deletion config/0chain_validator.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 1.0

# for testing # TS
# delegate wallet (must be set)
delegate_wallet: '9c693cb14f29917968d6e8c909ebbea3425b4c1bc64b6732cadc2a1869f49be9'
# maximum allowed number of stake holders
Expand Down
Loading