Skip to content

feat(server): wrap own db connection #11

feat(server): wrap own db connection

feat(server): wrap own db connection #11

Workflow file for this run

name: deploy
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout πŸ›Ž
uses: actions/checkout@v4
- name: Set up Docker Buildx πŸ› 
uses: docker/setup-buildx-action@v3
- 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 (tags, labels) for Docker πŸ“¦
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image 🐳
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Trigger deploy webhook πŸš€
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
WEBHOOK_TOKEN: ${{ secrets.WEBHOOK_TOKEN }}
run: |
curl "$WEBHOOK_URL" -H "Authorization: Bearer $WEBHOOK_TOKEN"