-
Notifications
You must be signed in to change notification settings - Fork 715
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
65 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: 'Run the provided command in an environment configured to monitor tmpnet networks' | ||
description: 'Run the provided command in an environment configured to monitor tmpnet networks' | ||
|
||
inputs: | ||
run: | ||
description: "the bash command to run" | ||
required: true | ||
repo: | ||
default: ${{ github.repository }} | ||
workflow: | ||
default: ${{ github.workflow }} | ||
run_id: | ||
default: ${{ github.run_id }} | ||
run_number: | ||
default: ${{ github.run_number }} | ||
run_attempt: | ||
default: ${{ github.run_attempt }} | ||
job_id: | ||
default: ${{ github.job }} | ||
prometheus_id: | ||
required: true | ||
prometheus_password: | ||
required: true | ||
loki_id: | ||
required: true | ||
loki_password: | ||
required: true | ||
|
||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Start monitoring tmpnet networks | ||
# Only run for the original repo; a forked repo won't have access to the monitoring credentials | ||
if: (inputs.prometheus_id != '') | ||
uses: ./.github/actions/start-monitoring-tmpnet-networks | ||
with: | ||
prometheus_id: ${{ inputs.prometheus_id }} | ||
prometheus_password: ${{ inputs.prometheus_password }} | ||
loki_id: ${{ inputs.loki_id }} | ||
loki_password: ${{ inputs.loki_password }} | ||
- name: Run command | ||
shell: bash | ||
run: ${{ inputs.run }} | ||
env: | ||
GH_WORKFLOW: ${{ inputs.workflow }} | ||
GH_RUN_ID: ${{ inputs.run_id }} | ||
GH_RUN_NUMBER: ${{ inputs.run_number }} | ||
GH_RUN_ATTEMPT: ${{ inputs.run_attempt }} | ||
GH_JOB_ID: ${{ inputs.job }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters