Skip to content

fix(deps): update dependency discord-api-types to v0.37.107 (#1290) #700

fix(deps): update dependency discord-api-types to v0.37.107 (#1290)

fix(deps): update dependency discord-api-types to v0.37.107 (#1290) #700

Workflow file for this run

name: Release to dev
on:
push:
branches:
- main
jobs:
container:
runs-on: ubuntu-latest
environment: dev
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
ENVIRONMENT: ${{ secrets.ENVIRONMENT }}
PROJECT_NAME: magibot-${{ secrets.ENVIRONMENT }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Image Name
run: |
echo "IMAGE_NAME=ghcr.io/${GITHUB_REPOSITORY@L}-${{ secrets.ENVIRONMENT }}" >> $GITHUB_ENV
- name: Build containers
run: docker compose --project-name ${{ env.PROJECT_NAME }} 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: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
- name: Push Docker image
run: docker push ${{ env.IMAGE_NAME }}
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: 'just-a-placeholder-so-we-dont-get-errors'
- name: Add Known Hosts
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Prune Leftover Docker Artifacts
run: docker system prune -af
env:
# To execute it on remote swarm
DOCKER_HOST: ssh://${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}
- name: Deploy stack
run: docker stack deploy --compose-file docker-compose.yml ${{ env.PROJECT_NAME }}
env:
# To execute it on remote swarm
DOCKER_HOST: ssh://${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}
# Env vars required to run the stack
TOKEN: ${{ secrets.TOKEN }}
OWNERID: ${{ secrets.OWNERID }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
STATCORD_TOKEN: ${{ secrets.STATCORD_TOKEN }}
APP_ID: ${{ secrets.APP_ID }}
WEBHOOK_ID_EX: ${{ secrets.WEBHOOK_ID_EX }}
WEBHOOK_TOKEN_EX: ${{ secrets.WEBHOOK_TOKEN_EX }}
WEBHOOK_ID_JOIN: ${{ secrets.WEBHOOK_ID_JOIN }}
WEBHOOK_TOKEN_JOIN: ${{ secrets.WEBHOOK_TOKEN_JOIN }}
WEBHOOK_ID_BUG: ${{ secrets.WEBHOOK_ID_BUG }}
WEBHOOK_TOKEN_BUG: ${{ secrets.WEBHOOK_TOKEN_BUG }}
WEBHOOK_ID_STARTUP: ${{ secrets.WEBHOOK_ID_STARTUP }}
WEBHOOK_TOKEN_STARTUP: ${{ secrets.WEBHOOK_TOKEN_STARTUP }}