Skip to content

Commit

Permalink
Merge pull request #130 from na2na-p/develop
Browse files Browse the repository at this point in the history
a
  • Loading branch information
na2na-p authored Oct 31, 2022
2 parents a463dc8 + 8385bd6 commit 161db9a
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/actions/github-app-token/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: github-app-token
description: github-app-token
inputs:
app_id:
description: app_id
required: true
private_key:
description: private_key
required: true

outputs:
token:
description: token
value: ${{ steps.token.outputs.token }}

runs:
using: composite
steps:
- uses: tibdex/[email protected]
with:
app_id: ${{ inputs.app_id }}
private_key: ${{ inputs.private_key }}
env:
OPENSSL_CONF: /dev/null
id: token
28 changes: 28 additions & 0 deletions .github/workflows/approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Approve

on:
pull_request:
types: [labeled]

jobs:
approve:
runs-on: ubuntu-latest
timeout-minutes: 1
if: ${{ github.event.label.name == 'Bypass approve' }}
env:
NUMBER: ${{ github.event.number }}

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Generate github token
id: generate_token
uses: ./.github/actions/github-app-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
# ghコマンドを利用して自身をreviewerに追加
- name: Approve
run: gh pr review ${{ env.NUMBER }} --approve
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-push-2na2-discord.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
context: .
push: true
tags: na2na/2na2-discord:${{ github.ref }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
Expand Down

0 comments on commit 161db9a

Please sign in to comment.