Skip to content

Deploy

Deploy #9

Workflow file for this run

name: Deploy
on:
workflow_run:
workflows: ["CI/CD Pipeline"]
branches: [main]
types: [completed]
permissions:
contents: read
packages: write
concurrency:
group: deploy
cancel-in-progress: true
jobs:
build-and-push:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
- name: Set lowercase repo
run: echo "REPO_LOWER=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: apps/web/Dockerfile
push: true
tags: ghcr.io/${{ env.REPO_LOWER }}/web:latest