Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add diagnostics to sync-proxy workflow #12362

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .github/workflows/sync-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,35 @@ jobs:
- if: inputs.version == 'latest' || inputs.version == ''
id: latest
run: gh release view --json tagName,name,url | jq -r 'to_entries[] | (.key + "=" + .value)' >> "$GITHUB_OUTPUT"
- name: steps.latest.outputs.tagName=${{ steps.latest.outputs.tagName }}
run: "true"
- name: steps.latest.outputs.name=${{ steps.latest.outputs.name }}
run: "true"
- name: steps.latest.outputs.url=${{ steps.latest.outputs.url }}
run: "true"

- if: inputs.version != 'latest' && inputs.version != ''
id: known
env:
VERSION: ${{ inputs.version }}
run: gh release view "$VERSION" --json tagName,name,url | jq -r 'to_entries[] | (.key + "=" + .value)' >> "$GITHUB_OUTPUT"
- name: steps.known.outputs.tagName=${{ steps.known.outputs.tagName }}
run: "true"
- name: steps.known.outputs.name=${{ steps.known.outputs.name }}
run: "true"
- name: steps.known.outputs.url=${{ steps.known.outputs.url }}
run: "true"

- name: Verify tagName
if: steps.latest.outputs.tagName == '' && steps.known.outputs.tagName == ''
run: exit 1
- name: Verify name
if: steps.latest.outputs.name == '' && steps.known.outputs.name == ''
run: exit 1
- name: Verify url
if: steps.latest.outputs.url == '' && steps.known.outputs.url == ''
run: exit 1

outputs:
tagName: ${{ steps.latest.outputs.tagName || steps.known.outputs.tagName }}
name: ${{ steps.latest.outputs.name || steps.known.outputs.name }}
Expand All @@ -49,8 +73,10 @@ jobs:
if [ "$(cat .proxy-version)" != "$VERSION" ]; then
echo changed=true >> "$GITHUB_OUTPUT"
fi
- name: steps.changed.outputs.changed=${{ steps.changed.outputs.changed == 'true' }}
run: "true"
outputs:
changed: ${{ steps.changed.outputs.changed =='true' }}
changed: ${{ steps.changed.outputs.changed == 'true' }}

sync-proxy:
needs: [meta, changed]
Expand Down