Skip to content

Commit 01e176c

Browse files
authored
Fix version check for instrumentation runner
1 parent 9818562 commit 01e176c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

actions/instrument/deploy/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ runs:
158158
if cat "$path" | yq '.jobs.export.container' | grep -q '^null$'; then
159159
name=opentelemetry-github-workflow-instrumentation-runner
160160
version=${{ steps.determine-instrumentation-version.outputs.version }}
161+
[ "$version" != main ] || exit 0
161162
image=ghcr.io/${{ github.repository_owner }}/"$name":"$version"
162163
if curl -s --fail --retry 8 --header "Authorization: Bearer ${{ inputs.github_token }}" "${GITHUB_API_URL:-https://api.github.com}"/users/${{ github.repository_owner }}/packages/container/"$name"/versions | jq .[].metadata.container.tags[] -r | grep -qE '^'"$version"'$' \
163164
|| (type docker 1> /dev/null 2> /dev/null && sudo docker pull "$image"); then
@@ -230,6 +231,7 @@ runs:
230231
if cat "$path" | yq '.jobs.export.container' | grep -q '^null$'; then
231232
name=opentelemetry-github-workflow-instrumentation-runner
232233
version=${{ steps.determine-instrumentation-version.outputs.version }}
234+
[ "$version" != main ] || exit 0
233235
image=ghcr.io/${{ github.repository_owner }}/"$name":"$version"
234236
if curl -s --fail --retry 8 --header "Authorization: Bearer ${{ inputs.github_token }}" "${GITHUB_API_URL:-https://api.github.com}"/users/${{ github.repository_owner }}/packages/container/"$name"/versions | jq .[].metadata.container.tags[] -r | grep -qE '^'"$version"'$' \
235237
|| (type docker 1> /dev/null 2> /dev/null && sudo docker pull "$image"); then

0 commit comments

Comments
 (0)