Skip to content

Commit

Permalink
Change: Check secret in bash
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalholthaus authored Dec 3, 2024
1 parent 0234947 commit 9133027
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/container-build-push-2nd-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,17 @@ jobs:
registry-password: ${{ secrets.GREENBONE_REGISTRY_TOKEN }}

harbor-replication:
if: github.event_name != 'pull_request' && secrets.GREENBONE_REGISTRY_REPLICATION_TOKEN
if: github.event_name != 'pull_request'
needs: create-multi-arch-manifest
runs-on: self-hosted-generic
steps:
- name: Trigger harbor replication
shell: bash
run: |
if ! [ '${{ secrets.GREENBONE_REGISTRY_REPLICATION_TOKEN }}' ]; then
echo "Secret GREENBONE_REGISTRY_REPLICATION_TOKEN does not exist"
exit 0
fi
curl -X POST \
https://${{ vars.GREENBONE_REGISTRY }}/api/v2.0/replication/executions \
-u '${{ secrets.GREENBONE_REGISTRY_REPLICATION_USER }}:${{ secrets.GREENBONE_REGISTRY_REPLICATION_TOKEN }}' \
Expand Down

0 comments on commit 9133027

Please sign in to comment.