Compare commits
33 Commits
a0f83b72d1
...
new-new
| Author | SHA1 | Date | |
|---|---|---|---|
| bd4d6d5655 | |||
| d4987ff717 | |||
| feb7bf12ed | |||
| 99393d16ce | |||
| 2a74089e37 | |||
| 3398c4f76f | |||
| 26a57c2206 | |||
| 38d562af9a | |||
| 64eb83f489 | |||
| 8ebded5c3f | |||
| ae79a067c4 | |||
| 6319fea371 | |||
| 768a35108a | |||
| cc4ec94402 | |||
| 872706e2b6 | |||
| d4604aa6fb | |||
| 2e82989ca0 | |||
| a67aaf3ca9 | |||
| 5ac880d37d | |||
| fd5d7e2cd4 | |||
| 3c01a716e6 | |||
| f0f354a8d4 | |||
| 8864f9585e | |||
| b7fb2ed335 | |||
| 760b6a8257 | |||
| d7bae2b72f | |||
| 2e4141834e | |||
| 4576ab5751 | |||
| 5114bcf9fe | |||
| a6877dda7e | |||
| 6d04254346 | |||
| 50c5bc458a | |||
| 31eccd5c09 |
@@ -41,11 +41,14 @@ runs:
|
||||
with:
|
||||
version: 3.1.3
|
||||
command: app actions run ${{ inputs.environment }} migrate --kind Deployment --resource-name ${{github.event.repository.name}}
|
||||
- name: Sync changes
|
||||
uses: clowdhaus/argo-cd-action/@main
|
||||
with:
|
||||
version: 3.1.3
|
||||
command: app sync ${{ inputs.environment }} --resource 'apps:Deployment:*'
|
||||
- name: Sync related deployments
|
||||
shell: bash
|
||||
run: |
|
||||
for name in $(argocd app resources ${{ inputs.environment }} | grep Deploy | grep ${{ github.event.repository.name }} | awk '{print($4)}'); do
|
||||
echo "Syncing $name"
|
||||
argocd app sync ${{ inputs.environment }} --resource "$name"
|
||||
done
|
||||
|
||||
- name: Refresh secret
|
||||
uses: clowdhaus/argo-cd-action/@main
|
||||
with:
|
||||
|
||||
25
.github/workflows/build.yaml
vendored
25
.github/workflows/build.yaml
vendored
@@ -11,6 +11,9 @@ on:
|
||||
force_build:
|
||||
type: boolean
|
||||
default: false
|
||||
arch:
|
||||
type: string
|
||||
default: "linux/amd64,linux/arm64/v8"
|
||||
secrets:
|
||||
VK_TEAMS_BOT_TOKEN:
|
||||
required: true
|
||||
@@ -69,9 +72,10 @@ jobs:
|
||||
- name: Restore Docker layer cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: /cache/buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
path: /cache/${{ github.repository }}/buildx-cache
|
||||
key: ${{ runner.os }}-${{ github.repository }}-buildx-${{ hashFiles(format('{0}/Dockerfile', github.workspace), format('{0}/**/requirements.txt', github.workspace), format('{0}/**/*lock*', github.workspace), format('{0}/**/package-lock.json', github.workspace), format('{0}/**/poetry.lock', github.workspace)) }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ github.repository }}-buildx-
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Build and push multi-arch image
|
||||
@@ -84,23 +88,24 @@ jobs:
|
||||
tags: |
|
||||
cr.yandex/${{ env.CR_REGISTRY }}/${{ env.CR_REPO }}:${{ env.SHORT_SHA }}
|
||||
cr.yandex/${{ env.CR_REGISTRY }}/${{ env.CR_REPO }}:${{ env.SAFE_TAG }}
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
platforms: ${{ inputs.arch }}
|
||||
ssh: default
|
||||
no-cache: ${{ inputs.force_build }}
|
||||
build-args: |
|
||||
GIT_COMMIT=${{ github.sha }}
|
||||
cache-from: |
|
||||
type=local,src=/cache/buildx-cache
|
||||
type=local,src=/cache/${{ github.repository }}/buildx-cache
|
||||
cache-to: |
|
||||
type=local,dest=/cache/buildx-cache-new,mode=max
|
||||
type=local,dest=/cache/${{ github.repository }}/buildx-cache-new,mode=max
|
||||
|
||||
- name: Move new cache if it exists
|
||||
if: always()
|
||||
run: |
|
||||
if [ -d /cache/buildx-cache-new ]; then
|
||||
mkdir -p /cache/${{ github.repository }}
|
||||
if [ -d /cache/${{ github.repository }}/buildx-cache-new ]; then
|
||||
echo "Found new buildx cache, replacing old one..."
|
||||
rm -rf /cache/buildx-cache
|
||||
mv /cache/buildx-cache-new /cache/buildx-cache
|
||||
rm -rf /cache/${{ github.repository }}/buildx-cache
|
||||
mv /cache/${{ github.repository }}/buildx-cache-new /cache/${{ github.repository }}/buildx-cache
|
||||
else
|
||||
echo "No new buildx cache found, keeping old one."
|
||||
fi
|
||||
@@ -109,8 +114,8 @@ jobs:
|
||||
if: always()
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: /cache/buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
path: /cache/${{ github.repository }}/buildx-cache
|
||||
key: ${{ runner.os }}-${{ github.repository }}-buildx-${{ hashFiles(format('{0}/Dockerfile', github.workspace), format('{0}/**/requirements.txt', github.workspace), format('{0}/**/*lock*', github.workspace), format('{0}/**/package-lock.json', github.workspace), format('{0}/**/poetry.lock', github.workspace)) }}
|
||||
|
||||
- name: Notify (result)
|
||||
if: always()
|
||||
|
||||
2
.github/workflows/deployk8s.yaml
vendored
2
.github/workflows/deployk8s.yaml
vendored
@@ -24,7 +24,7 @@ on:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: contains(format(',{0},', vars.ADMIN_USERS), format(',{0},', github.actor)) || inputs.environment=='stage'
|
||||
if: ${{ contains(format(',{0},', vars.ADMIN_USERS), format(',{0},', github.actor)) || startsWith(inputs.environment, 'stage') }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CR_REGISTRY: crp8vh46gd976oq8ipla
|
||||
|
||||
Reference in New Issue
Block a user