Merge pull request #45 from a-luna:improve-rate-limit-logic-and-add-c… #50
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: deploy-unicode-api | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
bake: | |
name: Build docker image for unicode-api and deploy to dokku | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Github Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GHCR_TOKEN }} | |
- name: Bake unicode-api image and push to github container registry | |
uses: docker/[email protected] | |
with: | |
files: ./docker-bake.hcl | |
targets: unicode-api | |
push: true | |
set: | | |
unicode-api.args.REDIS_PW=${{ secrets.REDIS_PW }} | |
unicode-api.args.UNICODE_VERSION=${{ secrets.UNICODE_VERSION }} | |
- name: Deploy unicode-api docker image to dokku | |
uses: dokku/github-action@master | |
with: | |
git_remote_url: 'ssh://dokku@${{ secrets.DOKKU_HOST }}:22/unicode-api' | |
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} | |
deploy_docker_image: ghcr.io/${{ github.repository_owner }}/unicode-api:${{ github.sha }} | |
git_push_flags: '--force' |