Skip to content

Update CI Pipeline. #16

Update CI Pipeline.

Update CI Pipeline. #16

Workflow file for this run

name: Build and Push Docker Image to Docker Hub & GHCR
on:
push:
branches:
- master
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: gautampatil1
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
run: |
docker build \
--build-arg WDS_SOCKET_PORT=0 \
--build-arg REACT_APP_FIREBASE_API_KEY=${{ secrets.REACT_APP_FIREBASE_API_KEY }} \
--build-arg REACT_APP_FIREBASE_AUTH_DOMAIN=rezume-a5269.firebaseapp.com \
--build-arg REACT_APP_FIREBASE_PROJECT_ID=rezume-a5269 \
--build-arg REACT_APP_FIREBASE_STORAGE_BUCKET=gs://rezume-a5269.appspot.com \
--build-arg REACT_APP_FIREBASE_MESSAGING_SENDER_ID=60826985488 \
--build-arg REACT_APP_FIREBASE_APP_ID=1:60826985488:web:2637058eb25c03f5d39695 \
--build-arg REACT_APP_FIREBASE_MEASUREMENT_ID=G-RVFTFZWE97 \
--build-arg REACT_APP_FIREBASE_DATABASE_URL=https://rezume-a5269-default-rtdb.asia-southeast1.firebasedatabase.app/ \
-t gautampatil1/rezume:latest \
.
- name: Push Docker image to Docker Hub
run: docker push gautampatil1/rezume:latest
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GH_PAT }}" | docker login ghcr.io -u gautampatil1 --password-stdin
- name: Push Docker image to ghcr.io
run: |
docker tag gautampatil1/rezume:latest ghcr.io/gautampatil1/rezume:latest
docker push ghcr.io/gautampatil1/rezume:latest