[chunithm] Support LUMINOUS PLUS + revive SUN Omnimix table for MYT (… #162
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: Bot CI/CD | |
on: | |
push: | |
branches: | |
- "main" | |
paths: | |
- "bot/**" | |
- "common/**" | |
workflow_dispatch: | |
jobs: | |
docker-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Docker Hub login | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./ | |
push: true | |
tags: ${{ secrets.DOCKER_USERNAME }}/tachi-bot:stable | |
file: ./Dockerfile.bot | |
cache-from: type=gha,scope=$GITHUB_REF_NAME-bot | |
cache-to: type=gha,mode=max,scope=$GITHUB_REF_NAME-bot | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [docker-push] | |
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | |
steps: | |
- name: Enable SSH Key | |
run: | | |
mkdir -p ~/.ssh | |
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa | |
sudo chmod 600 ~/.ssh/id_rsa | |
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts | |
env: | |
SSH_PRIVATE_KEY: ${{secrets.SSH_PRIVATE_KEY}} | |
SSH_KNOWN_HOSTS: ${{secrets.SSH_KNOWN_HOSTS}} | |
- name: Deploy updates | |
run: ssh ci@"$TACHI_HOST" /home/ci/tachi-devops/scripts/deploy_bot.sh | |
env: | |
TACHI_HOST: ${{secrets.TACHI_HOST}} |