bun init
This commit is contained in:
@@ -9,33 +9,33 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build and push with Kaniko
|
- name: Build and push with Kaniko (FIXED TAGS)
|
||||||
uses: aevea/action-kaniko@master
|
uses: aevea/action-kaniko@master
|
||||||
with:
|
with:
|
||||||
registry: harbor.apps.kopikopi.com.ru
|
registry: harbor.apps.kopikopi.com.ru
|
||||||
username: ${{ secrets.HARBOR_USERNAME }}
|
username: ${{ secrets.HARBOR_USERNAME }}
|
||||||
password: ${{ secrets.HARBOR_PASSWORD }}
|
password: ${{ secrets.HARBOR_PASSWORD }}
|
||||||
image: drone/test
|
image: drone/test
|
||||||
tags: latest,${{ gitea.sha }}
|
tags: main,latest,${{ gitea.sha }} # Добавляем main и latest
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile # Убедитесь, что Dockerfile существует!
|
dockerfile: Dockerfile
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
- name: Update infrastructure repository
|
- name: Update team-infra repository
|
||||||
run: |
|
run: |
|
||||||
# Клонируем team-infra
|
# Клонируем ПРАВИЛЬНЫЙ репозиторий team-infra
|
||||||
git clone https://${{ secrets.GITEA_USER }}:${{ secrets.GITEA_TOKEN }}@gitea.apps.kopikopi.com.ru/examples/nginx-intrasture.git
|
git clone https://${{ secrets.USER }}:${{ secrets.GITEA }}@gitea.apps.kopikopi.com.ru/examples/nginx-intrasture.git
|
||||||
cd team-infra
|
cd nginx-intrasture
|
||||||
|
|
||||||
# Обновляем тег образа в KubeVela Application
|
# Обновляем тег образа на main
|
||||||
sed -i "s|image:.*drone/test:.*|image: harbor.apps.kopikopi.com.ru/drone/test:${{ gitea.sha }}|g" vela-apps/1-simple/static-site.yaml
|
sed -i "s|image:.*drone/test:.*|image: harbor.apps.kopikopi.com.ru/drone/test:main|g" apps/static-site/deployment.yaml
|
||||||
|
|
||||||
# Коммитим и пушим
|
# Коммитим и пушим
|
||||||
git config user.name "CI/CD Bot"
|
git config user.name "CI/CD Bot"
|
||||||
git config user.email "ci-cd@kopikopi.com.ru"
|
git config user.email "ci-cd@kopikopi.com.ru"
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Update static-site to ${{ gitea.sha }}"
|
git commit -m "Update static-site image to main"
|
||||||
git push
|
git push
|
||||||
env:
|
env:
|
||||||
GITEA_USER: ${{ secrets.GITEA_USER }}
|
GITEA_USER: ${{ secrets.USER }}
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA }}
|
||||||
|
|||||||
Reference in New Issue
Block a user