Skip to content

Commit 62394de

Browse files
committed
chore: test
1 parent a9704ae commit 62394de

2 files changed

Lines changed: 24 additions & 19 deletions

File tree

.github/workflows/cleanup.yml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: 'Cleanup'
22

33
on:
4+
push:
5+
branches:
6+
- ci/**
47
schedule:
58
- cron: '0 0 * * 0'
69
workflow_dispatch:
@@ -11,33 +14,35 @@ permissions:
1114

1215
jobs:
1316
garbage-collector:
14-
name: 'Cache & Artifacts'
17+
name: 'Purge Storage'
1518
runs-on: ubuntu-latest
1619
steps:
17-
- name: 'Purge All Caches'
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: 'Clean Actions Cache'
1824
shell: bash
1925
run: |
20-
gh extension install actions/gh-actions-cache
21-
echo "::group::Cleaning Caches"
22-
# Удаляем все кэши. Если нужно оставить main, добавь: -B main
23-
gh actions-cache delete --all --confirm
26+
echo "::group::Deleting Caches"
27+
gh cache delete --all --succeed-on-no-caches || echo "Caches already empty or cleared"
2428
echo "::endgroup::"
2529
env:
2630
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2731

28-
- name: 'Purge Old Artifacts'
32+
- name: 'Clean Old Artifacts'
2933
shell: bash
3034
run: |
31-
echo "::group::Cleaning Artifacts"
32-
gh run allocation-status --repo ${{ github.repository }}
33-
34-
artifacts=$(gh api repos/${{ github.repository }}/actions/artifacts --paginate -q '.artifacts[].id')
35-
36-
for artifact_id in $artifacts; do
37-
gh api -X DELETE repos/${{ github.repository }}/actions/artifacts/$artifact_id
38-
done
35+
echo "::group::Deleting Artifacts"
36+
artifacts=$(gh api repos/${{ github.repository }}/actions/artifacts --paginate -q '.artifacts[].id' || echo "")
3937
40-
echo "All artifacts deleted."
38+
if [ -n "$artifacts" ]; then
39+
for id in $artifacts; do
40+
gh api -X DELETE repos/${{ github.repository }}/actions/artifacts/$id || true
41+
done
42+
echo "Artifacts cleared."
43+
else
44+
echo "No artifacts found."
45+
fi
4146
echo "::endgroup::"
4247
env:
4348
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/migrations.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ concurrency:
1616

1717
env:
1818
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
19-
DB_USER: test
20-
DB_PASSWORD: password
19+
DB_USER: tracker
20+
DB_PASSWORD: super-tracker-password
2121
DB_NAME: test
22-
DB_URL: postgres://user:password@localhost:5432/test_db
22+
DB_URL: postgres://tracker:super-tracker-password@localhost:5432/test
2323

2424
jobs:
2525
check:

0 commit comments

Comments
 (0)