From 22237b7bec82381690503869a4374265e79ea22c Mon Sep 17 00:00:00 2001 From: nalbam Date: Mon, 10 Jun 2024 10:58:40 +0900 Subject: [PATCH] fir gh action vars --- .github/workflows/push.yml | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7edf2fc..76378cb 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -6,15 +6,18 @@ on: - main env: - BOT_CURSOR: ${{ secrets.BOT_CURSOR }} + ALLOWED_CHANNEL_IDS: ${{ vars.ALLOWED_CHANNEL_IDS }} + BOT_CURSOR: ${{ vars.BOT_CURSOR }} + DYNAMODB_TABLE_NAME: ${{ vars.DYNAMODB_TABLE_NAME }} + ENABLE_IMAGE: ${{ vars.ENABLE_IMAGE }} + IMAGE_MODEL_ID: ${{ vars.IMAGE_MODEL_ID }} + SYSTEM_MESSAGE: ${{ vars.SYSTEM_MESSAGE }} + TEXT_MODEL_ID: ${{ vars.TEXT_MODEL_ID }} + + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} SLACK_SIGNING_SECRET: ${{ secrets.SLACK_SIGNING_SECRET }} - DYNAMODB_TABLE_NAME: ${{ secrets.DYNAMODB_TABLE_NAME }} - TEXT_MODEL_ID: ${{ secrets.TEXT_MODEL_ID }} - IMAGE_MODEL_ID: ${{ secrets.IMAGE_MODEL_ID }} - SYSTEM_MESSAGE: ${{ vars.SYSTEM_MESSAGE }} - ALLOWED_CHANNEL_IDS: ${{ secrets.ALLOWED_CHANNEL_IDS }} - ENABLE_IMAGE: ${{ secrets.ENABLE_IMAGE }} jobs: deploy: @@ -45,19 +48,15 @@ jobs: - name: Set up environment variables 📝 run: | + echo "ALLOWED_CHANNEL_IDS=${ALLOWED_CHANNEL_IDS}" >> .env echo "BOT_CURSOR=${BOT_CURSOR}" >> .env - echo "SLACK_BOT_TOKEN=${SLACK_BOT_TOKEN}" >> .env - echo "SLACK_SIGNING_SECRET=${SLACK_SIGNING_SECRET}" >> .env echo "DYNAMODB_TABLE_NAME=${DYNAMODB_TABLE_NAME}" >> .env - echo "TEXT_MODEL_ID=${TEXT_MODEL_ID}" >> .env + echo "ENABLE_IMAGE=${ENABLE_IMAGE}" >> .env echo "IMAGE_MODEL_ID=${IMAGE_MODEL_ID}" >> .env + echo "SLACK_BOT_TOKEN=${SLACK_BOT_TOKEN}" >> .env + echo "SLACK_SIGNING_SECRET=${SLACK_SIGNING_SECRET}" >> .env echo "SYSTEM_MESSAGE=${SYSTEM_MESSAGE}" >> .env - echo "ALLOWED_CHANNEL_IDS=${ALLOWED_CHANNEL_IDS}" >> .env - echo "ENABLE_IMAGE=${ENABLE_IMAGE}" >> .env + echo "TEXT_MODEL_ID=${TEXT_MODEL_ID}" >> .env - name: Deploy to AWS Lambda 🚀 - env: - AWS_REGION: 'us-east-1' - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - run: npx serverless deploy + run: npx serverless deploy --region us-east-1