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

gha(update-docs-webhook): fix workflow syntax #50778

Merged
merged 2 commits into from
Jan 8, 2025
Merged

Conversation

taraspos
Copy link
Contributor

@taraspos taraspos commented Jan 6, 2025

Summary

Workflow syntax introduced in:

Currently this action is failing on some of the branches where backports were merged:

@taraspos taraspos enabled auto-merge January 6, 2025 17:26
@taraspos taraspos added the no-changelog Indicates that a PR does not require a changelog entry label Jan 6, 2025
Copy link
Contributor

@fheinecke fheinecke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Would prefer consistent syntax with other workflows (unless there is some advantage to this approach) but this is really minor.

@@ -18,7 +18,7 @@ jobs:
steps:
- name: Call deployment webhook
env:
WEBHOOK_URL: ${{ secrets[AMPLIFY_DOCS_DEPLOY_HOOK] }}
WEBHOOK_URL: ${{ secrets["AMPLIFY_DOCS_DEPLOY_HOOK"] }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Why use this syntax instead of the secrets.AMPLIFY_DOCS_DEPLOY_HOOK used everywhere else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was done this way to support matrix, when we had to call two webhooks:

  • matrix:
    webhooks:
    - url_secret_name: DOCS_DEPLOY_HOOK
    http_method: GET
    - url_secret_name: AMPLIFY_DOCS_DEPLOY_HOOK
    http_method: POST
    steps:
    - name: Call deployment webhook
    env:
    WEBHOOK_URL: ${{ secrets[matrix.webhooks.url_secret_name] }}
    run: |
    if curl -X ${{ matrix.webhooks.http_method }} --silent --fail --show-error "$WEBHOOK_URL" > /dev/null; then
    echo "Triggered successfully"
    fi

Now when second webhook and matrix is removed, there is no real reason to keep it this way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in a9b7765

@taraspos taraspos added this pull request to the merge queue Jan 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 8, 2025
@taraspos taraspos enabled auto-merge January 8, 2025 10:59
@taraspos taraspos added this pull request to the merge queue Jan 8, 2025
Merged via the queue into master with commit a4c9470 Jan 8, 2025
41 checks passed
@taraspos taraspos deleted the taras/fix-docs-webhook branch January 8, 2025 11:12
@public-teleport-github-review-bot

@taraspos See the table below for backport results.

Branch Result
branch/v15 Create PR
branch/v16 Create PR
branch/v17 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants