Commit 8d8fb5fb
8d8fb5fb0cbcMerged
Dmitriy Zhilyaev <[email protected]> ยท 2 years ago ยท 1 file ยท ~1 modified
Description
fix(ci): dependabot
Signed-off-by: Dmitriy Zhilyaev [email protected]
Details
- Commit
- 8d8fb5fb0cbc
- Parent
- a5e0fff38bcd
.github/workflows/dependabot.ymlmodifiedView file
@@ -24,7 +24,6 @@
2424
2525
- name: generate changelog2626
uses: miniscruff/changie-action@v227-
id: changelog2827
if: github.actor == 'dependabot[bot]'2928
with:3029
version: latest@@ -56,21 +55,41 @@
5655
env:5756
TAG: ${{ steps.version.outputs.output }}5857
58+
- uses: wow-actions/use-app-token@v259+
id: token60+
with:61+
app_id: ${{ secrets.GH_APP_ID }}62+
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}63+
64+
5965
60-
# TODO: Fix protected branch61-
# ? change to stefanzweifel/git-auto-commit-action@v56266
- name: create release branch67+
uses: actions/github-script@v76368
continue-on-error: true64-
run: |65-
git config user.name "github-actions[bot]"66-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"67-
git checkout main68-
git checkout -b $BRANCH69-
git push origin $BRANCH7069
env:7170
BRANCH: release/${{ steps.next.outputs.version }}71+
with:72+
github-token: ${{ steps.token.outputs.BOT_TOKEN }}73+
script: |-274+
const main = await github.rest.git.getRef({75+
owner: context.repo.owner,76+
repo: context.repo.repo,77+
ref: 'heads/main',78+
})79+
80+
const ref = {81+
owner: context.repo.owner,82+
repo: context.repo.repo,83+
ref: 'heads/' + process.env.BRANCH,84+
sha: main.data.object.sha,85+
}86+
87+
await github.rest.git.createRef(ref)88+
result-encoding: string89+
90+
7291
73-
- name: change main to release branch92+
- name: main to release branch7493
run: gh pr edit ${{ github.event.number }} -B $BRANCH7594
env:7695
BRANCH: release/${{ steps.next.outputs.version }}@@ -82,5 +101,5 @@
82101
gh pr merge ${{ github.event.number }} --auto --merge83102
env:84103
BRANCH: release/${{ steps.next.outputs.version }}85-
GH_TOKEN: ${{ github.token }}104+
GH_TOKEN: ${{ steps.token.outputs.BOT_TOKEN }} # merge via helmwave[bot]86105