Skip to content

Commit

Permalink
[create-pull-request] automated change
Browse files Browse the repository at this point in the history
  • Loading branch information
nektos/act authored Oct 24, 2023
1 parent 5ecfdd1 commit e0d1d81
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/create_release_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
- 'minor'
- 'major'

permissions: write-all

jobs:
create-release-pr:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -43,6 +45,8 @@ jobs:
run: |
git add package.json
git commit -m "chore: release ${{ env.NEW_VERSION }}"
env:
HUSKY_SKIP_HOOKS: 1

- name: Generate GitHub App Token
uses: tibdex/github-app-token@v1
Expand All @@ -58,11 +62,16 @@ jobs:
branch: release/${{ env.NEW_VERSION }}
title: release ${{ env.NEW_VERSION }}
labels: release
base: main
# GITHUB_TOKENでは権限が足りなくPR生成後に他のワークフローがトリガーされないため、GitHub App Tokenを使用
# @see: https://github.com/peter-evans/create-pull-request/issues/48#issuecomment-536184102
token: ${{ steps.generate-token.outputs.token }}

- name: Enable Pull Request Automerge
run: gh pr merge --merge --auto "${{ steps.cpr.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
HUSKY_SKIP_HOOKS: 1

# - name: Enable Pull Request Automerge
# run: gh pr merge --merge --auto "${{ steps.cpr.outputs.pull-request-number }}"
# env:
# GH_TOKEN: ${{ steps.generate-token.outputs.token }}

2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh
[ -n "$HUSKY_SKIP_HOOKS" ] && exit 0

. "$(dirname "$0")/_/husky.sh"

export FORCE_COLOR=1;
Expand Down
28 changes: 28 additions & 0 deletions my.secrets
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
RELEASE_APP_ID=408186
RELEASE_APP_PRIVAT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S0lErD8f89KI7laVDJhyh1/qmrgdR9A/AoGACIPkNablOTnmN6ok1g4L
v69jbrYwrleb0BDxYjINJtK0yGCVJuDrS7XeHH5ryb8e94LKnuwFRQqR5QdTFaXx
uXyL3EaL16EW1snxp4FvfJ13NuS77H9NpTUkPRo22ZNq44brEITUQJ7+syW65ckl
isOzVsTHO1GXIYKTz89W4+UCgYEAnsdqHZJvKMtt4BpVlMfqC7GZSjL9yN+FGCdk
SlQW28XLODXonu2vC6SZUS5NR3qbM9r59zICW4iV+914ySJlQ4C9xQAWddUzRFJJ
VzndRXjVHMtNk4zowYkS2Hj8+ZrnWk/+6H5U8ewuudKSSG0iaSffLga4k3yZn/JG
uIJPpsECgYEA2hh8eLB+GgGgem0/IahTzFInEmvhu8RDdFreUqOhsT2RnxUeZW/X
4+1z22kUNvsg0pvL/A/IYWLgv+qFCm3GjykxUQMav8lh5Yzj3lsZRrbKjyvmeIIi
eoh51K+GIxvyB+x9ZYv4x/4qfIRcWlQJ8AqiK0fR6jKSVpwiwS8VB5Q=
-----END RSA PRIVATE KEY-----"
5 changes: 5 additions & 0 deletions sample.event
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"inputs": {
"release-version": "patch"
}
}

0 comments on commit e0d1d81

Please sign in to comment.