Skip to content

Update rock

Update rock #290

Workflow file for this run

name: Update rock
on:
workflow_dispatch: {}
schedule:
- cron: '0 0 * * *'
jobs:
build:
uses: canonical/observability/.github/workflows/rock-update.yaml@v1
secrets: inherit
with:
rock-name: opentelemetry-collector
source-repo: open-telemetry/opentelemetry-collector
check-go: true
update-script: |
cd "$(dirname "$rockcraft_yaml")" # cd into the rock folder
# Move the Go version to `ocb` from the `opentelemetry-collector` part
yq -i '(.parts.ocb.build-snaps) = (.parts.opentelemetry-collector.build-snaps | .[])' "$rockcraft_yaml"
yq -i 'del(.parts.opentelemetry-collector.build-snaps)' "$rockcraft_yaml"
# Move the version tag to `ocb` from the `opentelemetry-collector` part
yq -i '(.parts.ocb.source-tag) = (.parts.opentelemetry-collector.source-tag)' "$rockcraft_yaml"
yq -i 'del(.parts.opentelemetry-collector.source-tag)' "$rockcraft_yaml"
# Generate the OCB manifest
just ocb-manifest