diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2bb2959..d98bf51 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -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