Skip to content

Commit

Permalink
cleanup start/stop clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Dec 19, 2024
1 parent 1e48b81 commit 3d0f7a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/startclusters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
ENVIROMENT: dev
steps:
- uses: actions/checkout@v4 #Clone Repo

- name: 'Az CLI login'
uses: azure/login@v2
with:
Expand All @@ -26,8 +27,9 @@ jobs:
- name: Get GitHub Public IP
id: github_public_ip
run: echo "ipv4=$(curl 'https://ifconfig.me/ip')" >> $GITHUB_OUTPUT

- name: Add GitHub IP to KeyVault
id: update_firewall
run: |
az keyvault network-rule add --name "radix-keyv-${{ env.ENVIROMENT}}" \
--resource-group "${{ env.KV_GROUP}}" \
Expand All @@ -38,8 +40,9 @@ jobs:

- name: Start clusters
run: RADIX_ZONE_ENV=./scripts/radix-zone/radix_zone_dev.env TASK=start .github/workflows/scripts/dailytasks.sh

- name: Revoke GitHub IP on KeyVault
if: ${{ steps.update_firewall.outcome == 'success' && !cancelled()}} # Always run this step even if previous step failed
run: |
az keyvault network-rule remove --name "radix-keyv-${{ env.ENVIROMENT}}" \
--resource-group "${{ env.KV_GROUP}}" \
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/stopclusters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
ENVIROMENT: dev
steps:
- uses: actions/checkout@v4 #Clone Repo

- name: 'Az CLI login'
uses: azure/login@v2
with:
Expand All @@ -28,8 +29,9 @@ jobs:
- name: Get GitHub Public IP
id: github_public_ip
run: echo "ipv4=$(curl 'https://ifconfig.me/ip')" >> $GITHUB_OUTPUT

- name: Add GitHub IP to KeyVault
id: update_firewall
run: |
az keyvault network-rule add --name "radix-keyv-${{ env.ENVIROMENT}}" \
--resource-group "${{ env.KV_GROUP}}" \
Expand All @@ -42,6 +44,7 @@ jobs:
run: RADIX_ZONE_ENV=./scripts/radix-zone/radix_zone_dev.env TASK=stop .github/workflows/scripts/dailytasks.sh

- name: Revoke GitHub IP on KeyVault
if: ${{ steps.update_firewall.outcome == 'success' && !cancelled()}} # Always run this step even if previous step failed
run: |
az keyvault network-rule remove --name "radix-keyv-${{ env.ENVIROMENT}}" \
--resource-group "${{ env.KV_GROUP}}" \
Expand Down

0 comments on commit 3d0f7a2

Please sign in to comment.