generate-gpt-column #660
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: 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 |