Merge pull request #389 from scalamatsuri/dependabot/npm_and_yarn/nux… #241
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create PR releasing Production | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
PRReleaseProd: | |
name: Create PR releasing Production | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: | | |
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
git fetch origin master | |
git fetch origin production | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TZ: Asia/Tokyo | |
- run: | | |
cat << EOF > pr.template | |
Production! Release <%= Time.now.strftime("%F %T") %> | |
<% pull_requests.each do |pr| -%> | |
<%= "- ##{pr.pr.number} #{pr.mention}" %> | |
<% end -%> | |
EOF | |
- name: git-pr-release-prod | |
uses: bakunyo/git-pr-release-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GIT_PR_RELEASE_TEMPLATE: ./pr.template | |
GIT_PR_RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GIT_PR_RELEASE_BRANCH_STAGING: master | |
GIT_PR_RELEASE_BRANCH_PRODUCTION: production | |
TZ: Asia/Tokyo |