Comment out SESSION_SECRET in .env.local #26
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: Build and Push Kiln API Container Image to GHCR | |
on: | |
push: | |
branches: | |
- main # Trigger on pushes to the main branch | |
tags: | |
- 'v*.*.*' # Trigger on new tags like v1.0.0, v1.0.1, etc. | |
workflow_dispatch: # Allows manual triggering from the GitHub UI | |
env: | |
REGISTRY: ghcr.io | |
# Replace 'YOUR_GITHUB_USERNAME' with your GitHub username or organization name | |
# Replace 'YOUR_REPOSITORY_NAME' with the actual name of your GitHub repository | |
IMAGE_NAME: ${{ github.repository }} # This automatically resolves to 'owner/repo-name' | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
# Permissions required to write to GHCR (packages) | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- 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 }} | |
tags: | | |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} | |
type=sha,format=short | |
type=ref,event=tag # e.g., v1.0.0 | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile # Path to your Dockerfile | |
push: true # Push the image to the registry | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
# No build-args are explicitly needed here if env vars are via docker-compose/runtime |