Skip to content

fix: Remove quoting where it was actually broken. (#5) #5

fix: Remove quoting where it was actually broken. (#5)

fix: Remove quoting where it was actually broken. (#5) #5

Workflow file for this run

name: Continuous Deployment
on:
push:
branches: ["main"]
workflow_dispatch:
jobs:
build-and-push:
name: "Build & push Docker image"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Create full Docker image name
run: echo "IMAGE_NAME=$(echo "ghcr.io/${{ github.repository_owner }}/carbs" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate metadata
id: meta
uses: docker/[email protected]
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=sha
type=ref,event=tag
type=raw,value=latest,enable={{is_default_branch}}
- uses: docker/build-push-action@v6
name: "Build & push docker image"
with:
context: src
file: src/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
Deploy:
runs-on: ubuntu-latest
needs: [build-and-push]
steps:
- name: Ping deployment to pull new images
run: |
curl -X POST -H 'Authorization: Bearer ${{ secrets.DEPLOYMENT_TOKEN }}' ${{ secrets.DEPLOYMENT_API_URL }}