Skip to content

certs added

certs added #12

Workflow file for this run

name: CD
on:
push:
branches: [main]
jobs:
commit-hash:
runs-on: ubuntu-latest
outputs:
commit-hash: ${{ steps.get-commit-hash.outputs.commit-hash }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Get Commit Hash
id: get-commit-hash
run: echo "commit-hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
build-and-push-image:
needs: commit-hash
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout Code
uses: actions/checkout@v5
- name: Log in to Github Container Registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Frontend Docker Image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: ./apps/frontend/Dockerfile
push: true
tags: |
ghcr.io/manish591/blogbee-frontend:${{ needs.commit-hash.outputs.commit-hash }}
ghcr.io/manish591/blogbee-frontend:latest
- name: Build and Push Backend Docker Image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: ./apps/backend/Dockerfile
push: true
tags: |
ghcr.io/manish591/blogbee-backend:${{ needs.commit-hash.outputs.commit-hash }}
ghcr.io/manish591/blogbee-backend:latest