Merge pull request #50 from rex9840/main #27
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: 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 |