mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
Update CI workflow to utilize Kaniko for building and pushing Docker images
Some checks failed
CI/CD Pipeline / backend-lint (push) Failing after 30s
CI/CD Pipeline / backend-build (push) Has been skipped
CI/CD Pipeline / frontend-lint (push) Successful in 1m37s
CI/CD Pipeline / frontend-build (push) Failing after 38s
CI/CD Pipeline / e2e-test (push) Has been skipped
Some checks failed
CI/CD Pipeline / backend-lint (push) Failing after 30s
CI/CD Pipeline / backend-build (push) Has been skipped
CI/CD Pipeline / frontend-lint (push) Successful in 1m37s
CI/CD Pipeline / frontend-build (push) Failing after 38s
CI/CD Pipeline / e2e-test (push) Has been skipped
- Replace Docker Buildx with Kaniko for frontend and backend builds - Streamline image build and push steps with Kaniko action - Enhance caching strategy by specifying cache registry for both frontend and backend - Maintain Dockerfile and context paths for clarity and consistency
This commit is contained in:
parent
ab0c778651
commit
f751706372
@ -42,25 +42,19 @@ jobs:
|
|||||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Docker Buildx
|
- name: Build and push frontend with Kaniko
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: aevea/action-kaniko@v0.9.0
|
||||||
- name: Log in to registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
with:
|
||||||
registry: registry.bk.glpx.pro
|
registry: registry.bk.glpx.pro
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
- name: Build and push frontend
|
image: turash/turash-frontend
|
||||||
uses: docker/build-push-action@v5
|
tag: latest,${{ gitea.sha }}
|
||||||
with:
|
cache: true
|
||||||
|
cache_registry: registry.bk.glpx.pro/turash/turash-frontend
|
||||||
context: bugulma/frontend
|
context: bugulma/frontend
|
||||||
file: bugulma/frontend/Dockerfile
|
dockerfile: bugulma/frontend/Dockerfile
|
||||||
push: true
|
kaniko_executor_image: gcr.io/kaniko-project/executor:debug-v1.24.0
|
||||||
tags: |
|
|
||||||
registry.bk.glpx.pro/turash/turash-frontend:latest
|
|
||||||
registry.bk.glpx.pro/turash/turash-frontend:${{ gitea.sha }}
|
|
||||||
cache-from: type=registry,ref=registry.bk.glpx.pro/turash/turash-frontend:buildcache
|
|
||||||
cache-to: type=registry,ref=registry.bk.glpx.pro/turash/turash-frontend:buildcache,mode=max
|
|
||||||
|
|
||||||
backend-lint:
|
backend-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -111,25 +105,19 @@ jobs:
|
|||||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Docker Buildx
|
- name: Build and push backend with Kaniko
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: aevea/action-kaniko@v0.9.0
|
||||||
- name: Log in to registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
with:
|
||||||
registry: registry.bk.glpx.pro
|
registry: registry.bk.glpx.pro
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
- name: Build and push backend
|
image: turash/turash-backend
|
||||||
uses: docker/build-push-action@v5
|
tag: latest,${{ gitea.sha }}
|
||||||
with:
|
cache: true
|
||||||
|
cache_registry: registry.bk.glpx.pro/turash/turash-backend
|
||||||
context: bugulma/backend
|
context: bugulma/backend
|
||||||
file: bugulma/backend/Dockerfile
|
dockerfile: bugulma/backend/Dockerfile
|
||||||
push: true
|
kaniko_executor_image: gcr.io/kaniko-project/executor:debug-v1.24.0
|
||||||
tags: |
|
|
||||||
registry.bk.glpx.pro/turash/turash-backend:latest
|
|
||||||
registry.bk.glpx.pro/turash/turash-backend:${{ gitea.sha }}
|
|
||||||
cache-from: type=registry,ref=registry.bk.glpx.pro/turash/turash-backend:buildcache
|
|
||||||
cache-to: type=registry,ref=registry.bk.glpx.pro/turash/turash-backend:buildcache,mode=max
|
|
||||||
|
|
||||||
e2e-test:
|
e2e-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user