github.com/ava-labs/avalanchego@v1.11.11/.github/actions/run-monitored-tmpnet-cmd/action.yml (about) 1 name: 'Run the provided command in an environment configured to monitor tmpnet networks' 2 description: 'Run the provided command in an environment configured to monitor tmpnet networks' 3 4 inputs: 5 run: 6 description: "the bash command to run" 7 required: true 8 filter_by_owner: 9 default: '' 10 prometheus_id: 11 required: true 12 prometheus_password: 13 required: true 14 loki_id: 15 required: true 16 loki_password: 17 required: true 18 # The following inputs need never be provided by the caller. They 19 # default to context values that the action's steps are unable to 20 # acccess directly. 21 repository_owner: 22 default: ${{ github.repository_owner }} 23 repository_name: 24 default: ${{ github.event.repository.name }} 25 workflow: 26 default: ${{ github.workflow }} 27 run_id: 28 default: ${{ github.run_id }} 29 run_number: 30 default: ${{ github.run_number }} 31 run_attempt: 32 default: ${{ github.run_attempt }} 33 job: 34 default: ${{ github.job }} 35 36 runs: 37 using: composite 38 steps: 39 - name: Start prometheus 40 # Only run for the original repo; a forked repo won't have access to the monitoring credentials 41 if: (inputs.prometheus_id != '') 42 shell: bash 43 run: bash -x ./scripts/run_prometheus.sh 44 env: 45 PROMETHEUS_ID: ${{ inputs.prometheus_id }} 46 PROMETHEUS_PASSWORD: ${{ inputs.prometheus_password }} 47 - name: Start promtail 48 if: (inputs.prometheus_id != '') 49 shell: bash 50 run: bash -x ./scripts/run_promtail.sh 51 env: 52 LOKI_ID: ${{ inputs.loki_id }} 53 LOKI_PASSWORD: ${{ inputs.loki_password }} 54 - name: Notify of metrics availability 55 if: (inputs.prometheus_id != '') 56 shell: bash 57 run: ${{ github.action_path }}/notify-metrics-availability.sh 58 env: 59 GRAFANA_URL: https://grafana-poc.avax-dev.network/d/kBQpRdWnk/avalanche-main-dashboard?orgId=1&refresh=10s&var-filter=is_ephemeral_node%7C%3D%7Cfalse&var-filter=gh_repo%7C%3D%7C${{ inputs.repository_owner }}%2F${{ inputs.repository_name }}&var-filter=gh_run_id%7C%3D%7C${{ inputs.run_id }}&var-filter=gh_run_attempt%7C%3D%7C${{ inputs.run_attempt }} 60 GH_JOB_ID: ${{ inputs.job }} 61 FILTER_BY_OWNER: ${{ inputs.filter_by_owner }} 62 - name: Run command 63 shell: bash 64 run: ${{ inputs.run }} 65 env: 66 GH_REPO: ${{ inputs.repository_owner }}/${{ inputs.repository_name }} 67 GH_WORKFLOW: ${{ inputs.workflow }} 68 GH_RUN_ID: ${{ inputs.run_id }} 69 GH_RUN_NUMBER: ${{ inputs.run_number }} 70 GH_RUN_ATTEMPT: ${{ inputs.run_attempt }} 71 GH_JOB_ID: ${{ inputs.job }}