Skip to content

Commit e1321b0

Browse files
authored
Merge branch 'main' into fix_upload_action_2
2 parents 4336902 + 477b965 commit e1321b0

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/push.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,23 @@ jobs:
7676
outputs:
7777
matrix: ${{ steps.upgrade.outputs.matrix }}
7878

79+
harbor-replication:
80+
needs: push-postgres
81+
runs-on: self-hosted-generic
82+
steps:
83+
- name: Trigger harbor replication
84+
shell: bash
85+
run: |
86+
if ! [ '${{ secrets.GREENBONE_REGISTRY_REPLICATION_TOKEN }}' ]; then
87+
echo "Secret GREENBONE_REGISTRY_REPLICATION_TOKEN does not exist"
88+
exit 0
89+
fi
90+
curl --fail-with-body -X POST \
91+
https://${{ vars.GREENBONE_REGISTRY }}/api/v2.0/replication/executions \
92+
-u '${{ secrets.GREENBONE_REGISTRY_REPLICATION_USER }}:${{ secrets.GREENBONE_REGISTRY_REPLICATION_TOKEN }}' \
93+
-H "Content-Type: application/json" \
94+
-d '{"policy_id": 1}'
95+
7996
push-service:
8097
needs: push-postgres
8198
if: ${{ needs.push-postgres.outputs.matrix }}

0 commit comments

Comments
 (0)