mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
Refactor CI configuration to use Kaniko directly for building and pushing Docker images
Some checks failed
CI/CD Pipeline / backend-lint (push) Failing after 31s
CI/CD Pipeline / backend-build (push) Has been skipped
CI/CD Pipeline / frontend-lint (push) Successful in 1m38s
CI/CD Pipeline / frontend-build (push) Failing after 4s
CI/CD Pipeline / e2e-test (push) Has been skipped
Some checks failed
CI/CD Pipeline / backend-lint (push) Failing after 31s
CI/CD Pipeline / backend-build (push) Has been skipped
CI/CD Pipeline / frontend-lint (push) Successful in 1m38s
CI/CD Pipeline / frontend-build (push) Failing after 4s
CI/CD Pipeline / e2e-test (push) Has been skipped
- Replace aevea/action-kaniko with direct Kaniko executor commands for frontend and backend builds - Add Docker authentication setup for Kaniko - Update Kaniko image version to v1.24.0 and enhance caching options
This commit is contained in:
parent
6501e46b89
commit
2f8a244f1a
@ -40,20 +40,24 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: frontend-lint
|
needs: frontend-lint
|
||||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
||||||
|
container:
|
||||||
|
image: gcr.io/kaniko-project/executor:v1.24.0
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up Docker authentication
|
||||||
|
run: |
|
||||||
|
mkdir -p /kaniko/.docker
|
||||||
|
echo "{\"auths\":{\"registry.bk.glpx.pro\":{\"username\":\"${{ secrets.DOCKER_USERNAME }}\",\"password\":\"${{ secrets.DOCKER_PASSWORD }}\"}}}" > /kaniko/.docker/config.json
|
||||||
- name: Build and push frontend with Kaniko
|
- name: Build and push frontend with Kaniko
|
||||||
uses: aevea/action-kaniko@v0.9.0
|
run: |
|
||||||
with:
|
/kaniko/executor \
|
||||||
registry: registry.bk.glpx.pro
|
--dockerfile=bugulma/frontend/Dockerfile \
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
--context=bugulma/frontend \
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
--destination=registry.bk.glpx.pro/turash/turash-frontend:latest \
|
||||||
image: turash/turash-frontend
|
--destination=registry.bk.glpx.pro/turash/turash-frontend:${{ gitea.sha }} \
|
||||||
tag: latest,${{ gitea.sha }}
|
--cache=true \
|
||||||
cache: true
|
--cache-ttl=168h \
|
||||||
cache_registry: registry.bk.glpx.pro/turash/turash-frontend
|
--compressed-caching=false
|
||||||
context: bugulma/frontend
|
|
||||||
dockerfile: bugulma/frontend/Dockerfile
|
|
||||||
|
|
||||||
backend-lint:
|
backend-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -102,20 +106,24 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: backend-lint
|
needs: backend-lint
|
||||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
||||||
|
container:
|
||||||
|
image: gcr.io/kaniko-project/executor:v1.24.0
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up Docker authentication
|
||||||
|
run: |
|
||||||
|
mkdir -p /kaniko/.docker
|
||||||
|
echo "{\"auths\":{\"registry.bk.glpx.pro\":{\"username\":\"${{ secrets.DOCKER_USERNAME }}\",\"password\":\"${{ secrets.DOCKER_PASSWORD }}\"}}}" > /kaniko/.docker/config.json
|
||||||
- name: Build and push backend with Kaniko
|
- name: Build and push backend with Kaniko
|
||||||
uses: aevea/action-kaniko@v0.9.0
|
run: |
|
||||||
with:
|
/kaniko/executor \
|
||||||
registry: registry.bk.glpx.pro
|
--dockerfile=bugulma/backend/Dockerfile \
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
--context=bugulma/backend \
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
--destination=registry.bk.glpx.pro/turash/turash-backend:latest \
|
||||||
image: turash/turash-backend
|
--destination=registry.bk.glpx.pro/turash/turash-backend:${{ gitea.sha }} \
|
||||||
tag: latest,${{ gitea.sha }}
|
--cache=true \
|
||||||
cache: true
|
--cache-ttl=168h \
|
||||||
cache_registry: registry.bk.glpx.pro/turash/turash-backend
|
--compressed-caching=false
|
||||||
context: bugulma/backend
|
|
||||||
dockerfile: bugulma/backend/Dockerfile
|
|
||||||
|
|
||||||
e2e-test:
|
e2e-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user