Build and Push All The Docker Images #34
This file contains 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: CI for GHCR | |
on: | |
workflow_dispatch: | |
branches: | |
- 'main' | |
jobs: | |
build_and_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Build and push Backend | |
run: | | |
cd backend | |
docker build -t ghcr.io/${{ github.repository }}-backend:latest . | |
echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | |
docker push ghcr.io/${{ github.repository }}-backend:latest | |
- name: Build and push Frontend | |
run: | | |
cd frontend | |
docker build -t ghcr.io/${{ github.repository }}-frontend:latest . | |
echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | |
docker push ghcr.io/${{ github.repository }}-frontend:latest | |
# - name: Build and push Alloy API | |
# run: | | |
# cd alloy-app/api | |
# docker build -t ghcr.io/${{ github.repository }}-alloy-api:latest . | |
# echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | |
# docker push ghcr.io/${{ github.repository }}-alloy-api:latest |