Skip to content

Commit 91784b4

Browse files
committed
Force push using app token.
1 parent 6a80d98 commit 91784b4

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

.github/workflows/update_api.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Update API from slack-api-ref
1+
name: Update API
22
on:
33
workflow_dispatch:
44
schedule:
@@ -55,24 +55,21 @@ jobs:
5555
base: master
5656
committer: slack-ruby-ci-bot <noreply@github.com>
5757
author: slack-ruby-ci-bot <noreply@github.com>
58-
- name: Fetch pull request
59-
if: ${{ steps.cpr.outputs.pull-request-number != '' }}
60-
run: |
61-
git config user.name slack-ruby-ci-bot
62-
git config user.email noreply@github.com
63-
git pull
64-
git checkout automated-api-update
6558
- uses: jacobtomlinson/gha-find-replace@v3
6659
if: ${{ steps.cpr.outputs.pull-request-number != '' }}
6760
with:
6861
include: CHANGELOG.md
6962
find: "\\* Your contribution here."
7063
replace: "* [#${{steps.cpr.outputs.pull-request-number}}](https://github.com/slack-ruby-client/pulls/${{steps.cpr.outputs.pull-request-number}}): Update API from [slack-api-ref@${{ steps.api-ref.outputs.api-ref }}](https://github.com/slack-ruby/slack-api-ref/commit/${{ steps.api-ref.outputs.api-ref }}) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).\n* Your contribution here."
71-
- name: Update pull request
72-
env:
73-
GITHUB_TOKEN: ${{ steps.github_app_token.outputs.token || secrets.GITHUB_TOKEN }}
74-
if: ${{ steps.cpr.outputs.pull-request-number != '' }}
75-
run: |
76-
git add CHANGELOG.md
77-
git commit --amend --no-edit
78-
git push origin automated-api-update -f
64+
- name: push
65+
uses: dblock/commit@edcd15e90878df73c18a5bbdcd5755f10be8baa0
66+
with:
67+
github-token: ${{ steps.github_app_token.outputs.token || secrets.GITHUB_TOKEN }}
68+
push-branch: 'automated-api-update'
69+
commit-message: Update API from slack-api-ref@${{ steps.api-ref.outputs.api-ref }} (${{ steps.date.outputs.date }})
70+
commit-amend: true
71+
force-add: true
72+
force-push: true
73+
files: CHANGELOG.md
74+
name: slack-ruby-ci-bot
75+
email: noreply@github.com

0 commit comments

Comments
 (0)