Skip to content

Commit

Permalink
Merge branch 'main' into samuel/cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelarogbonlo committed Jul 24, 2023
2 parents 15cefa9 + 3d4ebe5 commit a48763a
Show file tree
Hide file tree
Showing 32 changed files with 2,136 additions and 1,099 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/client-auto-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy
on:
# Triggers this Action on push or pull request events on the "main" branch and when manually requested from the "Actions" tab
workflow_dispatch:
push:
tags:
- '^v[0-9]+.[0-9]+.[0-9]+$'

jobs:
auto-update-client:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout repository
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: Run Ansible playbook
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
uses: dawidd6/action-ansible-playbook@v2.6.1
with:
playbook: scripts/ansible/client-auto-update.yml
directory: ./
key: ${{ secrets.ANSIBLE_SSH_PRIVATE_KEY }}
inventory: ${{ secrets.ANSIBLE_INVENTORY }}

5 changes: 3 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Coverage

on:
push:
branches: [ main ]
pull_request:
types: [ labeled ]
push:
branches: [ main ]

env:
Expand All @@ -12,6 +12,7 @@ env:
jobs:
coverage:
name: Coverage
if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed'))
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
35 changes: 28 additions & 7 deletions .github/workflows/docker-hub-parachain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ name: Publish features parachain to Docker Hub
on:
workflow_dispatch:
push:
tags:
- '*'
pull_request:
branches: [ main ]
tags:
- '^v[0-9]+.[0-9]+.[0-9]+$'

jobs:
hadolint:
Expand All @@ -23,8 +21,10 @@ jobs:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v2
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: Docker meta
id: meta
Expand All @@ -50,7 +50,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3.2.0
with:
build-args: |
PROFILE=production
Expand All @@ -66,4 +66,25 @@ jobs:
format: 'sarif'
output: 'zeitgeist-node-parachain-report.sarif'
severity: 'HIGH,CRITICAL'


- name: Update image version of the existing Zeitgeist network spec
uses: "OnFinality-io/action-onf-release@v1"
with:
onf-access-key: ${{ secrets.ONF_ACCESS_KEY }}
onf-secret-key: ${{ secrets.ONF_SECRET_KEY }}
onf-workspace-id: ${{ secrets.ONF_WORKSPACE_ID }}
onf-network-key: ${{ secrets.ONF_NETWORK_KEY_ZG }}
onf-sub-command: image
onf-action: add
image-version: ${{ steps.vars.outputs.tag }}

- name: Update image version of the existing Battery Station network spec
uses: "OnFinality-io/action-onf-release@v1"
with:
onf-access-key: ${{ secrets.ONF_ACCESS_KEY }}
onf-secret-key: ${{ secrets.ONF_SECRET_KEY }}
onf-workspace-id: ${{ secrets.ONF_WORKSPACE_ID }}
onf-network-key: ${{ secrets.ONF_NETWORK_KEY_BS }}
onf-sub-command: image
onf-action: add
image-version: ${{ steps.vars.outputs.tag }}
11 changes: 9 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Rust

on:
push:
branches: [ main ]
pull_request:
types: [ labeled ]
push:
branches: [ main ]

env:
Expand All @@ -12,6 +12,7 @@ env:
jobs:
format:
name: Format
if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed'))
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -32,6 +33,7 @@ jobs:

copyright:
name: Copyright Notices
if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed'))
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -52,6 +54,7 @@ jobs:

checks:
name: Checks
if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed'))
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -75,6 +78,7 @@ jobs:

benchmark:
name: Quick check benchmarks
if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed'))
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -87,6 +91,7 @@ jobs:

test_standalone:
name: Test standalone build
if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed'))
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -117,6 +122,7 @@ jobs:

test_parachain:
name: Test parachain build
if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed'))
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -147,6 +153,7 @@ jobs:

fuzz:
name: Fuzz
if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed'))
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
22 changes: 17 additions & 5 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
pull_request_rules:
- name: Auto merge
conditions:
- base=main
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
- check-success=format
- check-success=tests
- check-success=fuzz
- check-success=benchmark
- check-success=Coverage / Coverage
- check-success=Rust / Format
- check-success=Rust / Copyright Notices
- check-success=Rust / Checks (clippy)
- check-success=Rust / Checks (parachain)
- check-success=Rust / Checks (standalone)
- check-success=Rust / Quick check benchmarks
- check-success=Rust / Test standalone build
- check-success=Rust / Test parachain build
- check-success=Rust / Fuzz
- label=s:accepted
actions:
label:
Expand All @@ -22,4 +27,11 @@ pull_request_rules:
actions:
comment:
message: This pull request is now in conflicts. Could you fix it @{{author}}? 🙏
label:
add:
- s:revision-needed
remove:
- s:accepted
- s:in-progress
- s:review-needed

7 changes: 7 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

/node/ @sea212
/runtime/ @sea212
# Ignore everything but mod.rs in /runtime/common/src/weights/
/runtime/common/src/weights/*
/runtime/common/src/weights/mod.rs @sea212
/zrml/authorized/ @Chralt98
/zrml/court/ @Chralt98
/zrml/global-disputes/ @Chralt98
Expand All @@ -13,3 +16,7 @@
/zrml/simple-disputes/ @Chralt98
/zrml/styx/ @yornaath
/zrml/swaps/ @maltekliemann

# Skip weight and Cargo.toml files
**/weights.rs
**/Cargo.toml
Loading

0 comments on commit a48763a

Please sign in to comment.