Skip to content

Commit

Permalink
add renovate & renovate-approve action
Browse files Browse the repository at this point in the history
  • Loading branch information
logica0419 committed Jan 13, 2024
1 parent e8b60e2 commit f323962
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/renovate-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Renovate Auto Merge

on:
pull_request:

permissions:
pull-requests: write
contents: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'trap-renovate[bot]' }}
steps:
- name: Approve Renovate PRs
run: |
gh pr review --approve ${{github.event.pull_request.html_url}}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
54 changes: 54 additions & 0 deletions .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Renovate

on:
workflow_dispatch:
inputs:
dryRun:
description: Dry-Run
default: "false"
required: false
logLevel:
description: Log-Level
default: debug
required: false
schedule:
# 5 a.m. in JST(+9)
- cron: "0 20 * * *"
push:
branches: ["main"]
paths:
- .github/renovate-bot.json5
- .github/renovate.json5
- .github/renovate/**.json5
- .github/workflows/renovate.json

env:
LOG_LEVEL: debug
RENOVATE_DRY_RUN: false
RENOVATE_CONFIG_FILE: .github/renovate-bot.json5

jobs:
renovate:
name: Renovate
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.PUSHER_APP_ID }}
private-key: ${{ secrets.PUSHER_PRIVATE_KEY }}
- uses: actions/checkout@v4
- name: Override default config from dispatch variables
shell: bash
run: |
echo "RENOVATE_DRY_RUN=${{ github.event.inputs.dryRun || env.RENOVATE_DRY_RUN }}" >> "${GITHUB_ENV}"
echo "LOG_LEVEL=${{ github.event.inputs.logLevel || env.LOG_LEVEL }}" >> "${GITHUB_ENV}"
- name: Renovate
uses: renovatebot/github-action@v39.2.4
with:
renovate-image: "ghcr.io/renovatebot/renovate"
# renovate:image-tag imageName=ghcr.io/renovatebot/renovate
renovate-version: "37.130.0"
configurationFile: "${{ env.RENOVATE_CONFIG_FILE }}"
token: "${{ steps.generate-token.outputs.token }}"

0 comments on commit f323962

Please sign in to comment.