Skip to content

Commit

Permalink
chore: Testing twingate
Browse files Browse the repository at this point in the history
  • Loading branch information
devops-chris committed Feb 29, 2024
1 parent 6769d61 commit 5123941
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .github/actions/tf-apply/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,26 @@ runs:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: false

- name: Twingate Connect
if: ${{ inputs.twingate_service_key != '' }} # Corrected syntax with a colon after the condition
uses: twingate/github-action@4493ffc3806241aa98194a3fa679f874bce013b5
with:
service-key: ${{ inputs.twingate_service_key }}
# - name: Twingate Connect
# if: ${{ inputs.twingate_service_key != '' }} # Corrected syntax with a colon after the condition
# uses: twingate/github-action@4493ffc3806241aa98194a3fa679f874bce013b5
# with:
# service-key: ${{ inputs.twingate_service_key }}

- name: Install Twingate
if: ${{ inputs.twingate_service_key != '' }}
run: |
echo "deb [trusted=yes] https://packages.twingate.com/apt/ /" | sudo tee /etc/apt/sources.list.d/twingate.list
sudo apt update -yq
sudo apt install -yq twingate
- name: Setup and start Twingate
if: ${{ inputs.twingate_service_key != '' }}
env:
TWINGATE_SERVICE_KEY: ${{ inputs.twingate_service_key }}
run: |
echo $TWINGATE_SERVICE_KEY | sudo twingate setup --headless=-
sudo twingate start
- name: Terraform Init
id: init
Expand Down Expand Up @@ -128,3 +143,6 @@ runs:
```
${{ steps.apply.outputs.apply }}
```
- name: Stop Twingate
if: ${{ inputs.twingate_service_key != '' }}
run: sudo twingate stop

0 comments on commit 5123941

Please sign in to comment.