Skip to content

Commit 4400379

Browse files
authored
feat(ci): add auto sync to registry (#254)
1 parent 11fad24 commit 4400379

File tree

3 files changed

+42
-4
lines changed

3 files changed

+42
-4
lines changed

.github/workflows/veinmind-push.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ on:
66
required: true
77
DOCKERHUB_TOKEN:
88
required: true
9-
HARBOR_USERNAME:
10-
required: true
11-
HARBOR_PASSWORD:
12-
required: true
139

1410
jobs:
1511
# push python plugins
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: veinmind-tools-sync
2+
on:
3+
workflow_call:
4+
secrets:
5+
HARBOR_USERNAME:
6+
required: true
7+
HARBOR_PASSWORD:
8+
required: true
9+
jobs:
10+
sync_harbor:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
plugin: [
15+
veinmind-backdoor,
16+
veinmind-history,
17+
veinmind-basic,
18+
veinmind-escape,
19+
veinmind-privilege-escalation,
20+
veinmind-iac,
21+
veinmind-log4j2,
22+
veinmind-malicious,
23+
veinmind-sensitive,
24+
veinmind-unsafe-mount,
25+
veinmind-vuln,
26+
veinmind-weakpass,
27+
veinmind-webshell,
28+
veinmind-minio,
29+
veinmind-runner
30+
]
31+
runs-on: ubuntu-20.04
32+
steps:
33+
- uses: actions/checkout@v3
34+
- name: skopeo-copy
35+
run: |
36+
skopeo sync --src docker --dest docker --dest-creds ${{ secrets.HARBOR_USERNAME }}:${{ secrets.HARBOR_PASSWORD }} veinmind/${{ matrix.plugin }}:${{github.ref_name}} registry.veinmind.tech/veinmind/
37+
skopeo sync --src docker --dest docker --dest-creds ${{ secrets.HARBOR_USERNAME }}:${{ secrets.HARBOR_PASSWORD }} veinmind/${{ matrix.plugin }}:latest registry.veinmind.tech/veinmind/

.github/workflows/veinmind-tools.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,10 @@ jobs:
1717
secrets:
1818
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
1919
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
20+
sync:
21+
if: startsWith(github.ref, 'refs/tags/')
22+
needs: [ push ]
23+
uses: ./.github/workflows/veinmind-sync.yml
24+
secrets:
2025
HARBOR_USERNAME: ${{ secrets.HARBOR_USERNAME }}
2126
HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }}

0 commit comments

Comments
 (0)