fix: rate limit #15
This file contains hidden or 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: Trigger auto deployment for misaka-bot | |
# When this action will be executed | |
on: | |
# Automatically trigger it when detected changes in repo | |
push: | |
branches: | |
[ master ] | |
paths: | |
- '**' | |
- '.github/workflows/misaka-bot-AutoDeployTrigger-c8edf222-b7b5-40b6-82dd-9def6998775f.yml' | |
# Allow mannually trigger | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
environment: ci | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout to the branch | |
uses: actions/checkout@v2 | |
- name: setup | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: build | |
run: npm ci --force && npm run build:js | |
- name: Azure Login | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.MISAKABOT_AZURE_CREDENTIALS }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Log in to container registry | |
uses: docker/login-action@v1 | |
with: | |
registry: docker.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Build and push container image to registry | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: misakakumomi/telegram-bot:${{ github.sha }} | |
file: ./Dockerfile | |
context: ./ | |
- name: Push container image to registry | |
uses: azure/container-apps-deploy-action@v1 | |
with: | |
containerAppName: misaka-bot | |
resourceGroup: misaka-bot | |
imageToDeploy: misakakumomi/telegram-bot:${{ github.sha }} | |