name: Build with Kaniko and Deploy on: [push] jobs: build-and-deploy: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Build and push with Kaniko uses: aevea/action-kaniko@master with: registry: harbor.apps.kopikopi.com.ru username: ${{ secrets.HARBOR_USERNAME }} password: ${{ secrets.HARBOR_PASSWORD }} image: drone/test tags: latest,${{ gitea.sha }} context: . dockerfile: Dockerfile # Убедитесь, что Dockerfile существует! cache: true - name: Update infrastructure repository run: | # Клонируем team-infra git clone https://${{ secrets.GITEA_USER }}:${{ secrets.GITEA_TOKEN }}@gitea.apps.kopikopi.com.ru/examples/nginx-intrasture.git cd team-infra # Обновляем тег образа в KubeVela Application sed -i "s|image:.*drone/test:.*|image: harbor.apps.kopikopi.com.ru/drone/test:${{ gitea.sha }}|g" vela-apps/1-simple/static-site.yaml # Коммитим и пушим git config user.name "CI/CD Bot" git config user.email "ci-cd@kopikopi.com.ru" git add . git commit -m "Update static-site to ${{ gitea.sha }}" git push env: GITEA_USER: ${{ secrets.GITEA_USER }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}