We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f88cacf commit 2141e96Copy full SHA for 2141e96
.github/workflows/build-and-publish.yaml
@@ -40,7 +40,7 @@ jobs:
40
- name: Add rule to VPC
41
id: sg-rule-id
42
run: |
43
- cidr="$(hostname -i)"
+ cidr=$(dig +short myip.opendns.com @resolver1.opendns.com)
44
echo $cidr
45
SGRID=$(ibmcloud is security-group-rule-add --sg ${{ secrets.SG_ID }} --direction=inbound --protocol=tcp --port-min=22 --port-max=22 --remote=$cidr --output JSON | jq -r '.id')
46
echo $SGRID
@@ -127,5 +127,6 @@ jobs:
127
tags: ${{ env.REGISTRY }}/${{ env.REPO_NAME }}:${{ github.event.inputs.tag || env.TAG }}
128
129
- name: Clean up
130
+ if: success() || failure()
131
132
ibmcloud is security-group-rule-delete ${{ secrets.SG_ID }} $RID -f
0 commit comments