Skip to content

Build Static Image

Build Static Image #83

Workflow file for this run

# For more details, read this: https://coolify.io/docs/github-actions
name: Build Static Image
on:
workflow_dispatch:
release:
types: [created]
env:
REGISTRY: ghcr.io
IMAGE_NAME: 'thomasevano/musickeeper'
jobs:
build-image-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4.1.7
- name: Login to ghcr.io
uses: docker/login-action@v3.3.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image and push to registry
uses: docker/build-push-action@v6.7.0
with:
context: .
file: Dockerfile
secrets: |
"vite_base_url=${{ secrets.VITE_BASE_URL }}"
"vite_turso_auth_token=${{ secrets.VITE_TURSO_AUTH_TOKEN }}"
"vite_turso_database_url=${{ secrets.VITE_TURSO_DATABASE_URL }}"
platforms: linux/amd64
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
- name: Deploy to Coolify
run: |
curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}'