From 9175a9476ed1f97ca1f3b31418cf2418b3da3775 Mon Sep 17 00:00:00 2001 From: Giovanni Petrantoni <7008900+sinkingsugar@users.noreply.github.com> Date: Tue, 16 Mar 2021 08:31:39 +0900 Subject: [PATCH] add stable/unstable auto bumps --- .github/workflows/nbc.yml | 45 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nbc.yml b/.github/workflows/nbc.yml index 61062e36f..6165d95a2 100644 --- a/.github/workflows/nbc.yml +++ b/.github/workflows/nbc.yml @@ -5,8 +5,49 @@ on: branches: - master +# maybe refactor using matrix but requires changes NBC side + jobs: - bumpNBC: + bumpNBC-stable: + runs-on: ubuntu-latest + steps: + - uses: status-im/github-app-token@v1 + name: Generate token + id: generate-token + with: + app_id: ${{ secrets.BUMP_BOT_APP_ID }} + private_key: ${{ secrets.BUMP_BOT_APP_PRIVATE_KEY }} + + - name: Clone NBC + uses: actions/checkout@v2 + with: + repository: status-im/nimbus-eth2 + ref: master + path: nbc + submodules: true + fetch-depth: 0 + + - name: Checkout this ref + run: | + cd nbc/vendor/nim-libp2p + git checkout $GITHUB_SHA + + - name: Commit this bump + run: | + cd nbc + git config --global user.email "${{ github.actor }}@users.noreply.github.com" + git config --global user.name = "${{ github.actor }}" + git commit -a -m "auto-bump nim-libp2p" + + - name: Make PR + uses: peter-evans/create-pull-request@v3.5.0 + with: + branch: nim-libp2p-auto-bump + path: nbc + token: ${{ steps.generate-token.outputs.token }} + title: nim-libp2p auto bump + + bumpNBC-unstable: runs-on: ubuntu-latest steps: - uses: status-im/github-app-token@v1 @@ -40,7 +81,7 @@ jobs: - name: Make PR uses: peter-evans/create-pull-request@v3.5.0 with: - branch: nim-libp2p-auto-bump + branch: nim-libp2p-auto-bump-unstable path: nbc token: ${{ steps.generate-token.outputs.token }} title: nim-libp2p auto bump