Skip to content

Validator Update PR #41

Validator Update PR

Validator Update PR #41

# The can be run manually via the github website if needed.
# Normally the go-tableland repo will run an action that triggers
# this to run when there is a release of the Validator.
name: Validator Update PR
on:
workflow_dispatch:
inputs:
validator_version:
description: "Validator version"
required: true
jobs:
validator-update-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Cache 📦
uses: actions/cache@v3
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Setup Node Environment ⬢
uses: actions/setup-node@v3
with:
node-version: 18
- name: Update validatorVersion in package.json
id: validator-version-bump
uses: jaywcjlove/[email protected]
with:
data: |
{
"validatorVersion": "${{ github.event.inputs.validator_version }}"
}
- run: echo "validator version - ${{ steps.info.outputs.version }} - ${{ github.event.inputs.validator_version }}"
- name: Install 🔧
run: npm install
- name: Build 🛠
run: npm run build
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.TEXTILEIO_MACHINE_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.TEXTILEIO_MACHINE_GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Run prettier
run: npm run prettier:fix
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.TEXTILEIO_MACHINE_ACCESS_TOKEN }}
committer: textileio-machine <[email protected]>
title: Validator Update PR ${{ github.event.inputs.validator_version }}
body: ✅ This PR was created by the Validator Update PR action for version ${{ github.event.inputs.validator_version }}
branch: validator-update-pr-${{ github.event.inputs.validator_version }}
signoff: true
commit-message: validator update ${{ github.event.inputs.validator_version }}