Skip to content

Update chains_config file #101

Update chains_config file

Update chains_config file #101

name: Update chains_config file
on:
workflow_dispatch:
inputs:
environment:
description: 'Which environment are you going to update (dev or prod)?'
required: true
type: choice
default: "prod"
options:
- dev
- prod
permissions:
pull-requests: write
contents: write
jobs:
update-chains-file:
runs-on: ubuntu-20.04
steps:
- name: 🛎 Checkout
uses: actions/checkout@v3
- name: 🔧 Install rust dependencies
uses: ./.github/workflows/rust-install
- name: 🛠 Set up env variables
uses: ./.github/workflows/setup-env
- name: 📝 Update chains_config file
uses: actions-rs/cargo@v1
with:
command: run
args: --release -- update-chain-config --env ${{ github.event.inputs.environment }} --version ${{ env.NOVA_CONFIG_VERSION }}
- name: 🗓️Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: 🔑 Generate token
uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.NOVASAMA_APP_ID }}
private_key: ${{ secrets.NOVASAMA_APP_PRIVATE_KEY }}
- name: ➡️ Make pull request
uses: ./.github/workflows/make-pull-request
with:
commit-path: config*.toml
commit-message: Update config file with chains_config
branch-name: update-chains_config-${{ steps.date.outputs.date }}
github-token: ${{ steps.generate-token.outputs.token }}