Skip to content

Commit

Permalink
Update CI Workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
GautamPatil1 committed Mar 25, 2024
1 parent a56d1e2 commit 9f5d1cf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 21 deletions.
21 changes: 3 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -20,28 +19,14 @@ jobs:
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 \
.
run: docker build -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 login --username gautampatil1 --password ${{ secrets.GH_PAT }} ghcr.io
docker tag gautampatil1/rezume:latest ghcr.io/gautampatil1/rezume:latest
docker push ghcr.io/gautampatil1/rezume:latest
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@ WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .

ENV WDS_SOCKET_PORT=0 \
REACT_APP_FIREBASE_API_KEY=AIzaSyA2zggT-V6eWeAZmRjMGklxJ7CKGzUOfvY \
REACT_APP_FIREBASE_AUTH_DOMAIN=rezume-a5269.firebaseapp.com \
REACT_APP_FIREBASE_PROJECT_ID=rezume-a5269 \
REACT_APP_FIREBASE_STORAGE_BUCKET=gs://rezume-a5269.appspot.com \
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=60826985488 \
REACT_APP_FIREBASE_APP_ID=1:60826985488:web:2637058eb25c03f5d39695 \
REACT_APP_FIREBASE_MEASUREMENT_ID=G-RVFTFZWE97 \
REACT_APP_FIREBASE_DATABASE_URL=https://rezume-a5269-default-rtdb.asia-southeast1.firebasedatabase.app/
RUN npm run build

FROM nginx:stable-alpine
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ services:
image: gautampatil1/rezume:latest
ports:
- "3000:80"
env_file:
.env

0 comments on commit 9f5d1cf

Please sign in to comment.