-
Notifications
You must be signed in to change notification settings - Fork 710
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
5 changed files
with
79 additions
and
46 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,46 @@ | ||
name: 'Run a tmpnet test command' | ||
description: 'Run the provided command with github environment variables set (helpful for enabling monitoring of tmpnet networks' | ||
|
||
inputs: | ||
artifact_prefix: | ||
description: 'the prefix to use for the network dir artifact. If not provided, an artifact will not be collected' | ||
default: '' | ||
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 }} | ||
|
||
|
||
runs: | ||
using: composite | ||
steps: | ||
- 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 }} | ||
- name: Upload tmpnet network dir | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: ${{ inputs.artifact_prefix }}-tmpnet-data | ||
path: | | ||
~/.tmpnet/networks | ||
~/.tmpnet/prometheus/prometheus.log | ||
~/.tmpnet/promtail/promtail.log | ||
if-no-files-found: error |
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
File renamed without changes.
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,20 @@ | ||
name: 'Upload an artifact of tmpnet data' | ||
description: 'Upload an artifact of data in the ~/.tmpnet path' | ||
|
||
inputs: | ||
name: | ||
description: "the name of the artifact to upload" | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Upload tmpnet data | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.name }} | ||
path: | | ||
~/.tmpnet/networks | ||
~/.tmpnet/prometheus/prometheus.log | ||
~/.tmpnet/promtail/promtail.log | ||
if-no-files-found: error |
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