name: "Deploy using Terraform and PalCloud Kubernetes" description: "Connects to PalCloud via Tailscale and runs a Terraform deploy with Kubernetes support" inputs: tailscale-token: description: "An authKey for connecting to Tailscale" required: true k8s-config: description: "A kubeconfig file for authenticating with the kube-api" required: true terraform-directory: description: "The directory containing your tf files" required: true runs: using: composite steps: - name: Install Alpine dependencies run: apk add nodejs npm git shell: sh - name: Install Terraform uses: https://gitea.palk.me/paltiverse/paltiverse-actions-setup-terraform@0.0.2 shell: sh - name: Connect to Paltiverse and configure kubectl uses: https://gitea.palk.me/paltiverse/paltiverse-actions-kubectl@1.0.3 id: kubectl with: tailscale-token: ${{ inputs.tailscale-token }} k8s-config: ${{ inputs.k8s-config }} shell: sh - name: Initialise Terraform (download providers) run: terraform init working-directory: ${{ inputs.terraform-directory }} shell: sh - name: Apply Terraform plan run: terraform apply -auto-approve -lock-timeout=30s working-directory: ${{ inputs.terraform-directory }} shell: sh env: HTTP_PROXY: ${{ steps.kubectl.outputs.http-proxy }} HTTPS_PROXY: ${{ steps.kubectl.outputs.http-proxy }} TF_VAR_kube_config_path: ${{ steps.kubectl.outputs.k8s-config-path }}