Set HTTP Response attributes on telemetry spans (#30) #86
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
name: build | |
on: | |
workflow_call: {} | |
push: | |
branches: | |
- main | |
- "v*.*.x" | |
jobs: | |
setup: | |
name: Setup | |
runs-on: ubuntu-22.04 | |
outputs: | |
components: ${{ steps.set-matrix.outputs.components }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- id: set-matrix | |
name: Output component builds | |
run: | | |
echo "components=$(ls ./components/ | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT | |
cat $GITHUB_OUTPUT | |
publish-docs: | |
name: Publish docs | |
runs-on: ubuntu-22.04 | |
if: github.ref == 'refs/heads/main' | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
cache-dependency-path: go.sum | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: pipenv | |
- name: Cache tools | |
uses: actions/cache@v4 | |
with: | |
path: ./tools | |
key: doc-tools | |
- name: Generate docs | |
run: pip install pipenv && make docs | |
- name: Upload docs | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: site/ | |
- name: Publish docs | |
uses: actions/deploy-pages@v4 | |
publish-component: | |
name: Publish component | |
runs-on: ubuntu-22.04 | |
needs: setup | |
strategy: | |
matrix: | |
component: ${{ fromJSON(needs.setup.outputs.components) }} | |
permissions: | |
contents: read | |
packages: write | |
env: | |
CONTAINER_REGISTRY: ghcr.io/${{ github.repository_owner }} | |
REGISTRY_USERNAME: ${{ github.actor }} | |
REGISTRY_PASSWORD: ${{ github.token }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Log in to ghcr.io | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ env.CONTAINER_REGISTRY }} | |
username: ${{ env.REGISTRY_USERNAME }} | |
password: ${{ env.REGISTRY_PASSWORD }} | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
cache-dependency-path: go.sum | |
- name: Cache tools | |
uses: actions/cache@v4 | |
with: | |
path: ./tools | |
key: build-tools | |
- name: Build and push component | |
run: make image COMPONENT=${{ matrix.component }} SKIP_GENERATE=true COMPRESS=true PUSH=true |