Skip to content

Merge pull request #50 from rex9840/main #27

Merge pull request #50 from rex9840/main

Merge pull request #50 from rex9840/main #27

name: Build and Push Nightly docker image
on:
push:
branches:
- main # Change this to your default branch if needed
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set lower case repository name
run: |
echo "REPOSITORY_LC=${REPOSITORY,,}" >> ${GITHUB_ENV}
env:
REPOSITORY: '${{ github.repository }}'
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
# Step 3: Sync Backend Image
- name: Build, Tag, and Push Backend Image
run: |
# Build the production image and tag it correctly
docker build --target production -t ghcr.io/$REPOSITORY_LC/gnome-nepal-backend:nightly .
docker push ghcr.io/$REPOSITORY_LC/gnome-nepal-backend:nightly
# Step 4: Sync Worker Image
- name: Build, Tag, and Push Worker Image
run: |
# Build the worker image and tag it correctly
docker build --target worker -t ghcr.io/$REPOSITORY_LC/gnome-nepal-worker-beat:nightly .
docker push ghcr.io/$REPOSITORY_LC/gnome-nepal-worker-beat:nightly