diff --git a/.github/workflows/verify-dashboards-alerts.yaml b/.github/workflows/verify-dashboards-alerts.yaml index 189494016..823b05c88 100644 --- a/.github/workflows/verify-dashboards-alerts.yaml +++ b/.github/workflows/verify-dashboards-alerts.yaml @@ -42,7 +42,6 @@ jobs: -X POST \ -H "Authorization: Bearer ${{ secrets.REGISTRATION_PAT }}" \ https://github.com/gitapi/repos/$REPO_OWNER/$REPO_NAME/actions/runners/registration-token) - echo $RESPONSE echo "REGISTRATION_TOKEN=$(echo $RESPONSE | jq -r .token)" >> $GITHUB_ENV @@ -58,7 +57,7 @@ jobs: tar xzf ./actions-runner-linux-x64-2.317.0.tar.gz ./config.sh --url https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }} --token $REGISTRATION_TOKEN --unattended --labels self-hosted,linux,aws - ./run.sh + nohup ./run.sh > nohup.out 2> nohup.err < /dev/null & EOF verify-dashboards-alerts: @@ -67,17 +66,17 @@ jobs: runs-on: self-hosted defaults: run: - shell: bash + shell: bash -ieo pipefail {0} steps: - uses: actions/checkout@v2 - name: Run Quickstart run: | + sudo chown $(whoami) . kind delete clusters kuadrant-local kind delete clusters kuadrant-local export ISTIO_INSTALL_SAIL=true - alias podman='sudo podman' cat << 'EOF' > automate_setup.expect #!/usr/bin/expect -f @@ -200,11 +199,11 @@ jobs: REPO_OWNER=${{ github.repository_owner }} REPO_NAME=${{ github.event.repository.name }} - RUNNER_ID=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + RUNNER_ID=$(curl -H "Authorization: Bearer ${{ secrets.REGISTRATION_PAT }}" \ -H "Accept: application/vnd.github.v3+json" \ https://github.com/gitapi/repos/$REPO_OWNER/$REPO_NAME/actions/runners | jq '.runners[] | select(.name=="self-hosted") | .id') - curl -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + curl -X DELETE -H "Authorization: Bearer ${{ secrets.REGISTRATION_PAT }}" \ -H "Accept: application/vnd.github.v3+json" \ https://github.com/gitapi/repos/$REPO_OWNER/$REPO_NAME/actions/runners/$RUNNER_ID diff --git a/self-hosted-runner.tf b/self-hosted-runner.tf index 808801c6c..611c5ebb4 100644 --- a/self-hosted-runner.tf +++ b/self-hosted-runner.tf @@ -40,7 +40,8 @@ resource "aws_instance" "example" { #!/bin/bash echo "Starting user_data script..." sudo apt-get update -y - sudo apt-get install -y podman golang libicu-dev + sudo apt-get install -y podman golang libicu-dev expect + sudo snap install yq curl -O https://s3.us-west-2.amazonaws.com/amazon-eks/1.30.0/2024-05-12/bin/linux/amd64/kubectl chmod +x ./kubectl mkdir -p /home/ubuntu/bin && cp ./kubectl /home/ubuntu/bin/kubectl