-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix wrong default branch for shared actions
- Loading branch information
Showing
3 changed files
with
82 additions
and
0 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,29 @@ | ||
name: dispatch-load-base-env-vars | ||
description: | | ||
Wrapper that clones a specific branch/ref of the shared-actions repo, then | ||
calls the `load-base-env-vars` action to download the base environment | ||
variables and load them into the current environment. | ||
This does not overwrite any environment variables that are already set. | ||
inputs: | ||
load_service_name: | ||
description: | | ||
If true, loads OTEL_SERVICE_NAME from the stashed env vars. This is used for top-level workflows. | ||
Otherwise the telemetry service name is obtained from Github job metadata. | ||
Getting the service name from Github job metadata is for child workflows. | ||
default: 'false' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Clone shared-actions repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ env.SHARED_ACTIONS_REPO || 'rapidsai/shared-actions' }} | ||
ref: ${{ env.SHARED_ACTIONS_REF || 'main' }} | ||
path: ./shared-actions | ||
- name: Set OTEL_SERVICE_NAME from job if not loading from stash | ||
if: ${{ inputs.load_service_name != 'true' }} | ||
uses: ./shared-actions/telemetry-impls/set-otel-service-name | ||
- name: Load base env vars | ||
uses: ./shared-actions/telemetry-impls/load-base-env-vars |
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,22 @@ | ||
name: dispatch-stash-base-env-vars | ||
description: | | ||
Clones a particular branch/ref of a shared-actions repo, then | ||
call the stash-base-env-vars implementation script, which writes | ||
some environment variables so that downstream jobs can refer to them. | ||
Inputs here are all assumed to be env vars set outside of this script. | ||
Set them in your main repo's workflows. | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Clone shared-actions repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ env.SHARED_ACTIONS_REPO || 'rapidsai/shared-actions' }} | ||
ref: ${{ env.SHARED_ACTIONS_REF || 'main' }} | ||
path: ./shared-actions | ||
- name: Get traceparent representation of current workflow | ||
uses: ./shared-actions/telemetry-impls/traceparent | ||
- name: Stash base env vars | ||
uses: ./shared-actions/telemetry-impls/stash-base-env-vars |
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,31 @@ | ||
name: dispatch-summarize | ||
description: | | ||
Clones a particular branch/ref of a shared-actions repo, then calls its telemetry summarize | ||
action. The summarize action downloads and parses Github job metadata, and creates | ||
OpenTelemetry spans from the job metadata. These are sent to the configured OTLP receiver/endpoint. | ||
inputs: | ||
cert_concat: | ||
description: Concatenation of certs (CA;Client;ClientKey) | ||
extra_attributes: | ||
description: | ||
Additional attributes to add to OTEL_RESOURCE_ATTRIBUTES. | ||
See https://opentelemetry.io/docs/languages/sdk-configuration/general/#otel_resource_attributes | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Clone shared-actions repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ env.SHARED_ACTIONS_REPO || 'rapidsai/shared-actions' }} | ||
ref: ${{ env.SHARED_ACTIONS_REF || 'main' }} | ||
path: ./shared-actions | ||
# This is necessary because this action will generally be run in a job separately from | ||
# where the env vars are set | ||
- name: Load base environment variables | ||
uses: ./shared-actions/telemetry-impls/load-base-env-vars | ||
- name: Run summarize action | ||
uses: ./shared-actions/telemetry-impls/summarize | ||
with: | ||
cert_concat: ${{ inputs.cert_concat }} | ||
extra_attributes: ${{ inputs.extra_attributes }} |