51 Commits

Author SHA1 Message Date
1540fce056 Merge pull request 'fix: cache only when build succesfull' (#59) from fix-build-cache into main
Reviewed-on: #59
Reviewed-by: nikitos <andriyanov@me.com>
2025-12-30 14:30:27 +00:00
0dcd1b5a97 fix: cache only when build succesfull 2025-12-30 07:24:30 +00:00
3c3cf1e01e Update .github/workflows/deployk8s.yaml 2025-12-19 13:08:06 +00:00
32235cb102 Update .github/workflows/deployk8s.yaml 2025-12-19 13:03:50 +00:00
a750a6b0cd Update .github/workflows/deployk8s.yaml 2025-12-19 12:54:49 +00:00
04914682ab Update .gitea/actions/k8s/action.yaml 2025-12-19 12:48:48 +00:00
26d0ef1b21 Update .github/workflows/deployk8s.yaml 2025-12-19 12:44:06 +00:00
b91d822d12 Update .github/workflows/deployk8s.yaml 2025-12-19 12:30:34 +00:00
6b3551e14e Update .gitea/actions/k8s/action.yaml 2025-12-19 12:29:30 +00:00
455f632cab Update .github/workflows/deployk8s.yaml 2025-12-19 12:19:14 +00:00
09181ac7b1 Update .gitea/actions/k8s/action.yaml 2025-12-19 12:15:16 +00:00
856783726d Update .gitea/actions/k8s/action.yaml 2025-12-19 12:15:03 +00:00
378b930ccc Update .gitea/actions/k8s/action.yaml 2025-12-19 12:14:45 +00:00
eeb15eb7dc Update .github/workflows/deployk8s.yaml 2025-12-19 12:10:24 +00:00
99c7507dd5 Update .github/workflows/deployk8s.yaml 2025-12-19 12:09:09 +00:00
6f79b96a0b Update .github/workflows/deployk8s.yaml 2025-12-19 12:06:43 +00:00
ef5149864b Merge pull request 'add tests' (#58) from fix-agaix into main
Reviewed-on: #58
2025-12-08 12:14:42 +00:00
f906007246 Merge branch 'main' into fix-agaix 2025-12-02 07:42:51 +00:00
7d47da47a3 add tests 2025-12-02 10:42:20 +03:00
8306409d93 Merge pull request 'fix-agaix' (#57) from fix-agaix into main
Reviewed-on: #57
2025-11-19 10:57:14 +00:00
6efe8999bc Merge branch 'main' of bb.hublab.ru:HUB/workflows 2025-11-19 13:56:49 +03:00
d558a37736 fix 2025-11-19 13:56:46 +03:00
42914c5104 Merge pull request 'fix' (#56) from fix-again into main
Reviewed-on: #56
2025-11-19 10:22:40 +00:00
a2c38737b4 Merge branch 'main' into fix-again 2025-11-19 10:22:30 +00:00
bd4d6d5655 fix 2025-11-19 12:52:43 +03:00
2a6b52c461 Merge pull request 'fix-again' (#55) from fix-again into main
Reviewed-on: #55
2025-11-19 09:50:23 +00:00
d4987ff717 Merge branch 'main' into fix-again 2025-11-19 09:50:17 +00:00
feb7bf12ed Merge branch 'fix-again' of bb.hublab.ru:HUB/workflows into fix-again 2025-11-19 12:49:58 +03:00
99393d16ce try to fix 2025-11-19 12:49:52 +03:00
2a74089e37 Merge pull request 'fix-again' (#54) from fix-again into main
Reviewed-on: #54
2025-11-19 09:13:38 +00:00
3398c4f76f Merge branch 'main' into fix-again 2025-11-19 09:13:30 +00:00
26a57c2206 Merge branch 'fix-again' of bb.hublab.ru:HUB/workflows into fix-again 2025-11-19 12:13:19 +03:00
38d562af9a return 2025-11-19 12:13:16 +03:00
64eb83f489 Merge pull request 'just fix' (#53) from fix-again into main
Reviewed-on: #53
2025-11-19 09:02:24 +00:00
8ebded5c3f Merge branch 'main' into fix-again 2025-11-19 09:02:16 +00:00
ae79a067c4 just fix 2025-11-19 12:01:42 +03:00
6319fea371 Merge pull request 'return' (#52) from fix-again into main
Reviewed-on: #52
2025-11-19 08:41:58 +00:00
768a35108a Merge branch 'main' into fix-again 2025-11-19 08:41:36 +00:00
cc4ec94402 test 2025-11-19 11:41:17 +03:00
872706e2b6 Merge pull request 'try with new mask' (#51) from fix-again into main
Reviewed-on: #51
2025-11-19 08:23:37 +00:00
d4604aa6fb try with new mask 2025-11-19 11:23:10 +03:00
2e82989ca0 Merge pull request 'change sync option' (#50) from change-deploy into main
Reviewed-on: #50
2025-11-19 07:56:12 +00:00
a67aaf3ca9 Merge branch 'main' into change-deploy 2025-11-19 07:47:47 +00:00
5ac880d37d fix 2025-11-19 10:46:30 +03:00
fd5d7e2cd4 change sync option 2025-11-19 10:42:28 +03:00
3c01a716e6 Merge pull request 'new deploy condition' (#49) from new_notify into main
Reviewed-on: #49
2025-11-11 11:10:15 +00:00
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
4576ab5751 Merge pull request 'test arch' (#47) from new_notify into main
Reviewed-on: #47
2025-10-17 12:33:50 +00:00
3 changed files with 50 additions and 13 deletions

View File

@@ -14,6 +14,18 @@ inputs:
secrets:
required: false
type: string
appName:
type: string
required: true
optionName:
type: string
required: true
tests:
type: bool
default: false
vault:
type: bool
default: false
runs:
using: 'composite'
@@ -28,31 +40,40 @@ runs:
uses: clowdhaus/argo-cd-action/@main
with:
version: 3.1.3
command: app set ${{ inputs.environment }} --parameter images.${{github.event.repository.name}}=${{ inputs.tag }}
command: app set ${{ inputs.environment }} --parameter ${{ inputs.optionName }}=${{ inputs.tag }}
- name: Sync changes
if: ${{ inputs.migrate == 'true' }}
uses: clowdhaus/argo-cd-action/@main
with:
version: 3.1.3
command: app sync ${{ inputs.environment }} --resource apps:Deployment:${{github.event.repository.name}}
command: app sync ${{ inputs.environment }} --resource apps:Deployment:${{ inputs.appName }}
- name: Migrate
if: ${{ inputs.migrate == 'true' }}
uses: clowdhaus/argo-cd-action/@main
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:*'
command: app actions run ${{ inputs.environment }} migrate --kind Deployment --resource-name ${{ inputs.appName }}
- name: Sync related deployments
shell: bash
run: |
for name in $(argocd app resources ${{ inputs.environment }} | grep Deploy | grep ${{ inputs.appName }} | awk '{print($4)}'); do
echo "Syncing $name"
argocd app sync ${{ inputs.environment }} --resource apps:Deployment:$name;
done
- name: Refresh secret
if: ${{ inputs.vault == 'true' }}
uses: clowdhaus/argo-cd-action/@main
with:
version: 3.1.3
command: app actions run ${{ inputs.environment }} refresh --kind ExternalSecret --resource-name vault-${{github.event.repository.name}}
command: app actions run ${{ inputs.environment }} refresh --kind ExternalSecret --resource-name vault-${{ inputs.appName }}
- name: Restart service
uses: clowdhaus/argo-cd-action/@main
with:
version: 3.1.3
command: app actions run ${{ inputs.environment }} restart --kind Deployment --resource-name ${{github.event.repository.name}}
command: app actions run ${{ inputs.environment }} restart --kind Deployment --resource-name ${{ inputs.appName }}
- name: Run Tests
if: ${{ inputs.tests == 'true' }}
uses: clowdhaus/argo-cd-action/@main
with:
version: 3.1.3
command: app actions run ${{ inputs.environment }} run-tests --kind Deployment --resource-name ${{ inputs.appName }}

View File

@@ -99,7 +99,7 @@ jobs:
type=local,dest=/cache/${{ github.repository }}/buildx-cache-new,mode=max
- name: Move new cache if it exists
if: always()
if: steps.build-step.outcome == 'success'
run: |
mkdir -p /cache/${{ github.repository }}
if [ -d /cache/${{ github.repository }}/buildx-cache-new ]; then
@@ -111,7 +111,7 @@ jobs:
fi
- name: Save Docker layer cache
if: always()
if: steps.build-step.outcome == 'success'
uses: actions/cache/save@v4
with:
path: /cache/${{ github.repository }}/buildx-cache

View File

@@ -21,10 +21,22 @@ on:
host:
type: string
required: true
name:
type: string
required: false
option:
type: string
required: false
tests:
type: string
default: true
vault:
type: string
default: true
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
@@ -47,6 +59,10 @@ jobs:
environment: ${{ inputs.environment }}
tag: ${{ inputs.tag }}
migrate: ${{ inputs.migrate }}
appName: ${{ inputs.name || github.event.repository.name }}
optionName: ${{ inputs.option || format('images.{0}', github.event.repository.name) }}
tests: ${{ inputs.tests }}
vault: ${{ inputs.vault }}
- name: post-notify
if: always()
uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/vk-notify@main