Update rock #290
This file contains hidden or 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: 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 |