[fix] Fixed CI/CD

This commit is contained in:
ITQ
2024-04-01 01:23:12 +03:00
parent 0867866f00
commit 78251bbcda
3 changed files with 7 additions and 37 deletions
+1 -9
View File
@@ -53,19 +53,11 @@ jobs:
- name:
run: cd backend/project && python manage.py test
build_and_push:
test_build:
runs-on: ubuntu-latest
needs: testing
steps:
- 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
run: docker build -t skillhub_backend backend/
- name: Push Docker image
run: docker push skillhub_backend
+2 -7
View File
@@ -13,11 +13,6 @@ jobs:
steps:
- 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
run: docker-compose up -d
run: |
docker-compose up -d --build
+4 -21
View File
@@ -18,28 +18,11 @@ jobs:
run: cd frontend && npm run lint
continue-on-error: true
build_and_push:
test_build:
runs-on: ubuntu-latest
needs: linting
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Node.js
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
- uses: actions/checkout@v3
- name: Build Docker image
run: docker build -t skillhub-backend frontend/