update api to add setToken method #82
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: Docker Image CI | |
| on: | |
| push: | |
| branches: ['main'] | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| build: | |
| # if: ${{ false }} | |
| runs-on: ubuntu-22.04 | |
| environment: | |
| name: prod | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.SUBMODULE_PAT }} | |
| submodules: 'recursive' | |
| - name: Create .env file | |
| uses: SpicyPizza/create-envfile@v2.0 | |
| with: | |
| envkey_CLIENT_ID: ${{ vars.TWITCH_CLIENT_ID }} | |
| envkey_CLIENT_SECRET: ${{ secrets.TWITCH_CLIENT_SECRET }} | |
| envkey_SPOTIFY_CLIENT_ID: ${{ vars.SPOTIFY_CLIENT_ID }} | |
| envkey_SPOTIFY_SECRET: ${{ secrets.SPOTIFY_CLIENT_SECRET }} | |
| envkey_BOT_ID: ${{ vars.BOT_ID }} | |
| envkey_CHANNELS: ${{ vars.CHANNELS }} | |
| envkey_TWITCH_ID: ${{ vars.TWITCH_ID }} | |
| envkey_REDIS_HOST: ${{ vars.REDIS_HOST }} | |
| envkey_REDIS_PORT: ${{ vars.REDIS_PORT }} | |
| - name: Verify .env file | |
| run: cat .env | |
| - name: Build image | |
| run: docker compose build | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push image to Github Container Registry | |
| run: docker compose push | |
| - name: Delete submodule directory | |
| run: rm -rf ./digittron-files |