diff --git a/.github/workflows/bumper.yml b/.github/workflows/bumper.yml new file mode 100644 index 0000000..d16c38f --- /dev/null +++ b/.github/workflows/bumper.yml @@ -0,0 +1,36 @@ +name: Bumper +on: + push: + branches: + - unstable + - bumper + workflow_dispatch: + +jobs: + bumpNimbus: + runs-on: ubuntu-latest + steps: + - name: Clone NBC + uses: actions/checkout@v2 + with: + repository: status-im/nimbus-eth2 + ref: unstable + path: nbc + submodules: true + fetch-depth: 0 + token: ${{ secrets.ACTIONS_GITHUB_TOKEN }} + + - 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" + git branch -D nim-libp2p-auto-bump-${GITHUB_REF##*/} || true + git switch -c nim-libp2p-auto-bump-${GITHUB_REF##*/} + git push -f origin nim-libp2p-auto-bump-${GITHUB_REF##*/} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb214fc..685bd8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -170,86 +170,3 @@ jobs: nimble --version nimble install_pinned nimble test - - bumpNBC-stable: - if: github.ref == 'refs/heads/master' - needs: build - 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: unstable - 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: - if: github.ref == 'refs/heads/unstable' - needs: build - 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: unstable - 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-unstable - path: nbc - token: ${{ steps.generate-token.outputs.token }} - title: nim-libp2p unstable auto bump - draft: true