diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 729777e0..3f9ac212 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -24,13 +24,41 @@ jobs: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get -qq update && sudo apt-get -qq install -y apg coreutils make - - name: Set up ngrok - id: ngrok - uses: gabriel-samfira/ngrok-tunnel-action@v1.1 - with: - ngrok_authtoken: ${{ secrets.NGROK_AUTH_TOKEN }} - port: 9997 - tunnel_type: http + - name: Set up localshow tunnel + shell: bash + run: | + mkdir -p /home/runner/.ssh + echo "${{ secrets.SSH_PRIVATE_KEY }}" > /home/runner/.ssh/ssh_key + sudo chown -R runner:runner /home/runner/.ssh + sudo chmod 500 /home/runner/.ssh + sudo chmod 400 /home/runner/.ssh/ssh_key + + SUBDOMAIN=$(apg -a 0 -M l -m 12 -n 1) + echo "::add-mask::$SUBDOMAIN" + + BASE_URL="${{ secrets.TUNNEL_BASE_URL }}" + GARM_BASE_URL="https://$SUBDOMAIN.$BASE_URL" + echo "::add-mask::$GARM_BASE_URL" + + echo "GARM_BASE_URL=$GARM_BASE_URL" >> $GITHUB_ENV + + cat <&1 env: - GARM_BASE_URL: ${{ steps.ngrok.outputs.tunnel-url }} ORG_NAME: gsamfira REPO_NAME: garm-testing CREDENTIALS_NAME: test-garm-creds @@ -87,7 +114,6 @@ jobs: sudo systemctl stop garm@runner || true go run ./test/integration/gh_cleanup/main.go || true env: - GARM_BASE_URL: ${{ steps.ngrok.outputs.tunnel-url }} ORG_NAME: gsamfira REPO_NAME: garm-testing GH_TOKEN: ${{ secrets.GH_OAUTH_TOKEN }}