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
|
||||
needs: frontend-lint
|
||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
||||
container:
|
||||
image: gcr.io/kaniko-project/executor:v1.24.0
|
||||
steps:
|
||||
- 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
|
||||
uses: aevea/action-kaniko@v0.9.0
|
||||
with:
|
||||
registry: registry.bk.glpx.pro
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
image: turash/turash-frontend
|
||||
tag: latest,${{ gitea.sha }}
|
||||
cache: true
|
||||
cache_registry: registry.bk.glpx.pro/turash/turash-frontend
|
||||
context: bugulma/frontend
|
||||
dockerfile: bugulma/frontend/Dockerfile
|
||||
run: |
|
||||
/kaniko/executor \
|
||||
--dockerfile=bugulma/frontend/Dockerfile \
|
||||
--context=bugulma/frontend \
|
||||
--destination=registry.bk.glpx.pro/turash/turash-frontend:latest \
|
||||
--destination=registry.bk.glpx.pro/turash/turash-frontend:${{ gitea.sha }} \
|
||||
--cache=true \
|
||||
--cache-ttl=168h \
|
||||
--compressed-caching=false
|
||||
|
||||
backend-lint:
|
||||
runs-on: ubuntu-latest
|
||||
@ -102,20 +106,24 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: backend-lint
|
||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
||||
container:
|
||||
image: gcr.io/kaniko-project/executor:v1.24.0
|
||||
steps:
|
||||
- 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
|
||||
uses: aevea/action-kaniko@v0.9.0
|
||||
with:
|
||||
registry: registry.bk.glpx.pro
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
image: turash/turash-backend
|
||||
tag: latest,${{ gitea.sha }}
|
||||
cache: true
|
||||
cache_registry: registry.bk.glpx.pro/turash/turash-backend
|
||||
context: bugulma/backend
|
||||
dockerfile: bugulma/backend/Dockerfile
|
||||
run: |
|
||||
/kaniko/executor \
|
||||
--dockerfile=bugulma/backend/Dockerfile \
|
||||
--context=bugulma/backend \
|
||||
--destination=registry.bk.glpx.pro/turash/turash-backend:latest \
|
||||
--destination=registry.bk.glpx.pro/turash/turash-backend:${{ gitea.sha }} \
|
||||
--cache=true \
|
||||
--cache-ttl=168h \
|
||||
--compressed-caching=false
|
||||
|
||||
e2e-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Loading…
Reference in New Issue
Block a user