-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
80 additions
and
79 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
name: CD Pipeline | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['CI Pipeline'] | ||
branches: | ||
- staging | ||
types: | ||
- completed | ||
|
||
jobs: | ||
build: | ||
runs-on: [self-hosted, oracle-vps] | ||
|
||
steps: | ||
- name: Pull Docker image | ||
run: sudo docker pull ${{ secrets.DOCKER_USERNAME }}/like-minded-fe-staging:latest | ||
- name: Delete Old docker container | ||
run: sudo docker rm -f like-minded-fe-staging-container || true | ||
- name: Run Docker Container | ||
run: sudo docker run -d -p 3000:3000 --name like-minded-fe-staging-container ${{ secrets.DOCKER_USERNAME }}/like-minded-fe-staging:latest | ||
name: CD Pipeline | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['CI Pipeline'] | ||
branches: | ||
- staging | ||
types: | ||
- completed | ||
|
||
jobs: | ||
build: | ||
runs-on: [self-hosted, oracle-vps] | ||
|
||
steps: | ||
- name: Pull Docker image | ||
run: sudo docker pull ${{ secrets.DOCKER_USERNAME }}/like-minded-fe-staging:latest | ||
- name: Delete Old docker container | ||
run: sudo docker rm -f like-minded-fe-staging-container || true | ||
- name: Run Docker Container | ||
run: sudo docker run -d -p 3000:3000 --name like-minded-fe-staging-container ${{ secrets.DOCKER_USERNAME }}/like-minded-fe-staging:latest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,58 @@ | ||
name: CI Pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.10.0 | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Build Next.js App | ||
run: npm run build | ||
|
||
docker: | ||
runs-on: ubuntu-latest | ||
|
||
needs: build | ||
name: Build NextJS docker image | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to docker hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and Push Docker Image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
target: dev | ||
platforms: linux/amd64,linux/arm64/v8 | ||
push: true | ||
tags: ${{ secrets.DOCKER_USERNAME }}/like-minded-fe-staging:latest | ||
build-args: | | ||
NEXT_PUBLIC_API_ENDPOINT=${{ secrets.NEXT_PUBLIC_API_ENDPOINT }} | ||
NEXT_PUBLIC_WS_ENDPOINT=${{ secrets.NEXT_PUBLIC_WS_ENDPOINT }} | ||
name: CI Pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.10.0 | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Build Next.js App | ||
run: npm run build | ||
|
||
docker: | ||
runs-on: ubuntu-latest | ||
|
||
needs: build | ||
name: Build NextJS docker image | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to docker hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and Push Docker Image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
target: dev | ||
platforms: linux/amd64,linux/arm64/v8 | ||
push: true | ||
tags: ${{ secrets.DOCKER_USERNAME }}/like-minded-fe-staging:latest | ||
build-args: | | ||
NEXT_PUBLIC_API_ENDPOINT=${{ secrets.NEXT_PUBLIC_API_ENDPOINT }} | ||
NEXT_PUBLIC_WS_ENDPOINT=${{ secrets.NEXT_PUBLIC_WS_ENDPOINT }} |
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