Renovate #847
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: Renovate | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" # every AM 9 JST | |
pull_request: | |
types: | |
- closed | |
branches: | |
- main | |
env: | |
RENOVATE_USERNAME: "postalcode-renovate-ci[bot]" | |
RENOVATE_GIT_AUTHOR: "postalcode.renovate-ci bot <115638951+postalcode-renovate-ci[bot]@users.noreply.github.com>" | |
jobs: | |
renovate: | |
# マージ時に実行する際の条件分岐。pull_request eventではrenovate用ブランチ(prefix=`renovate/`)がマージされた場合にのみ実行させる | |
if: github.event_name != 'pull_request' || (github.event.pull_request.merged == true && startsWith(github.head_ref,'renovate/')) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3 | |
- name: generate github token | |
id: generate_github_token | |
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c # tag=v1.7.0 | |
with: | |
app_id: ${{ secrets.RENOVATE_APP_ID }} | |
private_key: ${{ secrets.RENOVATE_APP_PRIVATE_KEY }} | |
- uses: renovatebot/github-action@e3e5485adcef612196fb016d8b7c432c643f747b # tag=v34.24.0 | |
with: | |
token: "x-access-token:${{ steps.generate_github_token.outputs.token }}" | |
env: | |
RENOVATE_REPOSITORIES: ${{ github.repository }} | |
RENOVATE_USERNAME: ${{ env.RENOVATE_USERNAME }} | |
RENOVATE_GIT_AUTHOR: ${{ env.RENOVATE_GIT_AUTHOR }} | |
RENOVATE_ONBOARDING: false |