fix wrong default branch for shared actions #377
Workflow file for this run
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
on: | |
pull_request: | |
push: | |
workflow_dispatch: | |
env: | |
SHARED_ACTIONS_REF: ${{github.ref}} | |
jobs: | |
compute_traceparent: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout actions | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{env.SHARED_ACTIONS_REF}} | |
path: ./shared-actions | |
- name: Get job traceparent | |
uses: ./shared-actions/telemetry-traceparent | |
id: job-traceparent | |
- name: Echo value from job | |
run: echo "${{steps.job-traceparent.outputs.traceparent}}" | |
example_matrix: | |
name: Test ${{ matrix.os}}-${{ matrix.version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: [1, 2] | |
os: [ubuntu-latest] # , windows-latest | |
steps: | |
- name: Checkout actions | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{env.SHARED_ACTIONS_REF}} | |
path: ./shared-actions | |
# Run job with traceparent. We'll validate that this matches in the summary data. | |
- name: Get job traceparent in matrix job | |
uses: ./shared-actions/telemetry-traceparent | |
id: job-traceparent | |
- name: Generate traceparent for a step | |
uses: ./shared-actions/telemetry-traceparent | |
id: step-traceparent | |
with: | |
step_name: "Download gha-tools with git clone" | |
- name: Echo computed step traceparent | |
run: | | |
echo "GHA tools clone job traceparent: ${{ steps.step-traceparent.outputs.traceparent }}" | |
- name: Test OTel export of job JSON | |
uses: ./shared-actions/telemetry-summarize | |
with: | |
traceparent: ${{ steps.job-traceparent.outputs.traceparent}} |