[fix] Fixed CI/CD
This commit is contained in:
@@ -53,19 +53,11 @@ jobs:
|
|||||||
- name:
|
- name:
|
||||||
run: cd backend/project && python manage.py test
|
run: cd backend/project && python manage.py test
|
||||||
|
|
||||||
build_and_push:
|
test_build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: testing
|
needs: testing
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: docker.io
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: docker build -t skillhub_backend backend/
|
run: docker build -t skillhub_backend backend/
|
||||||
- name: Push Docker image
|
|
||||||
run: docker push skillhub_backend
|
|
||||||
|
|||||||
@@ -13,11 +13,6 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: docker.io
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
|
||||||
- name: Pull Docker images and start containers
|
- name: Pull Docker images and start containers
|
||||||
run: docker-compose up -d
|
run: |
|
||||||
|
docker-compose up -d --build
|
||||||
|
|||||||
@@ -18,28 +18,11 @@ jobs:
|
|||||||
run: cd frontend && npm run lint
|
run: cd frontend && npm run lint
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
build_and_push:
|
test_build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: linting
|
needs: linting
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- uses: actions/checkout@v3
|
||||||
uses: actions/checkout@v3
|
- name: Build Docker image
|
||||||
- name: Install Node.js
|
run: docker build -t skillhub-backend frontend/
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: '18'
|
|
||||||
- name: Install dependencies
|
|
||||||
run: cd frontend && npm install
|
|
||||||
- name: Build
|
|
||||||
run: cd frontend && npm run build
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: docker.io
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
|
||||||
- name: Build and push Docker image
|
|
||||||
run: |
|
|
||||||
docker build -t skillhub-backend frontend/
|
|
||||||
docker push skillhub-backend
|
|
||||||
|
|||||||
Reference in New Issue
Block a user