12 Commits

Author SHA1 Message Date
f0f354a8d4 Merge branch 'main' into new_notify 2025-11-11 11:09:56 +00:00
8864f9585e new deploy condition 2025-11-11 14:06:46 +03:00
b7fb2ed335 Merge pull request 'new_notify' (#48) from new_notify into main
Reviewed-on: #48
2025-10-21 15:14:52 +00:00
760b6a8257 Merge branch 'main' into new_notify 2025-10-21 15:14:44 +00:00
d7bae2b72f Merge branch 'new_notify' of bb.hublab.ru:HUB/workflows into new_notify 2025-10-21 18:14:12 +03:00
2e4141834e change absolute way 2025-10-21 18:14:09 +03:00
4576ab5751 Merge pull request 'test arch' (#47) from new_notify into main
Reviewed-on: #47
2025-10-17 12:33:50 +00:00
5114bcf9fe Merge branch 'main' into new_notify 2025-10-17 12:33:45 +00:00
a6877dda7e test arch 2025-10-17 15:32:54 +03:00
6d04254346 Merge pull request 'change cash' (#46) from new_notify into main
Reviewed-on: #46
2025-10-16 11:25:52 +00:00
50c5bc458a Merge branch 'main' into new_notify 2025-10-16 11:25:40 +00:00
31eccd5c09 change cash 2025-10-16 14:25:18 +03:00
2 changed files with 16 additions and 11 deletions

View File

@@ -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()

View File

@@ -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