Skip to content

Commit

Permalink
Refactored Bash Script to inline
Browse files Browse the repository at this point in the history
  • Loading branch information
swissbuechi committed Dec 24, 2022
1 parent a94ff05 commit a774dc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ runs:

- name: Wait for a VPN connection with default DNS test
if: (inputs.dns-server != null) && (inputs.test-ping-ip-host == null) && (inputs.test-dns-host == null)
run: counter=0; until [ $counter -ge 10 ] || dig @${{ inputs.dns-server }} ${{ inputs.dns-server }} A +time=1; do counter=$((counter+1)); sleep 2; done; [ $counter -ge 10 ] && exit 1
run: counter=0; until [ $counter -ge 10 ]; do if dig @${{ inputs.dns-server }} ${{ inputs.dns-server }} A +time=1; then exit 0; fi; counter=$((counter+1)); sleep 2; done; exit 1
shell: bash

- name: Wait for a VPN connection with custom DNS test
if: (inputs.dns-server != null) && (inputs.test-dns-host != null)
run: counter=0; until [ $counter -ge 10 ] || dig @${{ inputs.dns-server }} ${{ inputs.test-dns-host }} A +time=1; do counter=$((counter+1)); sleep 2; done; [ $counter -ge 10 ] && exit 1
run: counter=0; until [ $counter -ge 10 ]; do if dig @${{ inputs.dns-server }} ${{ inputs.test-dns-host }} A +time=1; then exit 0; fi; counter=$((counter+1)); sleep 2; done; exit 1
shell: bash

- name: Wait for a VPN connection with default test ping ip host
Expand Down

0 comments on commit a774dc3

Please sign in to comment.