-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (47 loc) · 1.52 KB
/
generate-gpt-column.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: generate-gpt-column
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
env:
AWS_REGION : "ap-northeast-1"
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.MZ_SITE_ROLE_ARN }}
role-session-name: image-push-session
aws-region: ${{ env.AWS_REGION }}
- name: Set up Deno environment
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Generate and add new column
id: update-for-gpt-column
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
SLACK_CHANNEL_ID: ${{ vars.MAIN_SLACK_CHANNEL_ID }}
run: |
cd ${GITHUB_WORKSPACE}/scripts
deno task generate:column
git add ${GITHUB_WORKSPACE}/src/_data
- name: Commit and Create Pull request
uses: peter-evans/create-pull-request@v6
with:
commit-message: "chore: Add column by AI"
author: "mameka <[email protected]>"
branch: daily-mameka-column
delete-branch: true
title: "[auto-review] Automatically update Mameka's column"
body: "review the generated content and verify its accuracy."
reviewers: kudoh
labels: bot