Skip to content

Instantly share code, notes, and snippets.

@suzuki-shunsuke
Created May 12, 2022 05:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suzuki-shunsuke/f2e3d52bf8f5da053e06e9d80398b27b to your computer and use it in GitHub Desktop.
Save suzuki-shunsuke/f2e3d52bf8f5da053e06e9d80398b27b to your computer and use it in GitHub Desktop.
name: Close Renovate pull requests
on:
workflow_dispatch:
inputs: {}
schedule:
# The "*" (#42, asterisk) character has special semantics in YAML, so this
# string has to be quoted.
- cron: '0/15 * * * *'
permissions:
contents: write # this is needed to remove branches
pull-requests: write # this is needed to search and close pull requests
issues: read # this is needed to search pull requests with labels
jobs:
autocalose-renovate:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: suzuki-shunsuke/renovate-autoclose-action@v0.1.0
with:
additional_filter: '-label:exclude-autoclose'
github_token: ${{ steps.generate_token.outputs.token }}
---
name: renovate-issue-action
on:
pull_request:
branches: [master]
types:
- closed
permissions:
issues: write
contents: read
jobs:
build:
if: github.event.pull_request.user.login == 'renovate[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: aquaproj/aqua-installer@v1.0.0
with:
aqua_version: v1.5.1
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- run: renovate-issue-action
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment