This repository has been archived by the owner on Jan 7, 2025. It is now read-only.
proto-dependency-update #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.inputs.commit_hash }} > Cargo.tmp && mv Cargo.tmp Cargo.toml | |
git add Cargo.toml | |
git commit -m "Update aptos-protos to ${{ github.event.inputs.commit_hash }}" | |
gh auth login --with-token ${{ secrets.CI_TOKEN }} | |
git push origin ${{ github.event.inputs.branch_name }}-update-dependency | |
gh pr create --title "Update aptos-protos to ${{ github.event.inputs.commit_hash }}" --body "Update aptos-protos to ${{ github.event.inputs.commit_hash }}" --base main --head ${{ github.event.inputs.branch_name }}-update-dependency | |
working-directory: aptos-indexer-processors-sdk/ |