Skip to content
name: Update Proto Dependency
on:
push:
workflow_dispatch:
inputs:
branch_name:
description: 'Branch name'
required: true
default: ''
commit_hash:
description: 'Commit hash'
required: true
default: ''
repository_dispatch:
types: [proto-dependency-update]
jobs:
update-the-dependency:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install toml
run: cargo install toml-cli
- name: Update the dependency
run: |
set -e
git config --global credential.helper store
echo "https://larry-aptos:${{ secrets.CI_TOKEN}}@github.com" > ~/.git-credentials
toml set Cargo.toml workspace.dependencies.aptos-protos.rev ${{ github.event.client_payload.commit_hash }} > Cargo.tmp && mv Cargo.tmp Cargo.toml
working-directory: aptos-indexer-processors-sdk/
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit and Push Changes
run: |
git add Cargo.toml
git commit -m "Automated commit message"
git push --force
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
working-directory: aptos-indexer-processors-sdk/