Skip to content

[DX-3584] post build tests repository dispatch#22063

Open
Tofel wants to merge 7 commits intodevelopfrom
dx-3584-post-build-tests-repository-dispatch
Open

[DX-3584] post build tests repository dispatch#22063
Tofel wants to merge 7 commits intodevelopfrom
dx-3584-post-build-tests-repository-dispatch

Conversation

@Tofel
Copy link
Copy Markdown
Contributor

@Tofel Tofel commented Apr 17, 2026

  1. Custom event can be sent:
  curl -L \
    --fail-with-body \
    -X POST \
    -H "Accept: application/vnd.github+json" \
    -H "Authorization: ***" \
    https://api.github.com/repos/smartcontractkit/chainlink/dispatches \
    -d @- <<'JSON'
  {
    "event_type": "build_publish_finished",
    "client_payload": {
      "chainlink_image_tag": "2.43.0-beta.0",
      "chainlink_version": "22063/merge"
    }
  }
  JSON
  shell: /usr/bin/bash -e {0}
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   148    0     0  100   148      0    451 --:--:-- --:--:-- --:--:--   452
  1. workflow_call trigger removed from post-build chainlink.
  2. can't test whether tests will be triggered until workflow with repository_dispatch is in develop

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 17, 2026

✅ No conflicts with other open PRs targeting develop

@Tofel Tofel force-pushed the dx-3584-post-build-tests-repository-dispatch branch from 3e412d3 to 7043b39 Compare April 17, 2026 12:43
@Tofel Tofel marked this pull request as ready for review April 17, 2026 13:55
@Tofel Tofel requested review from a team as code owners April 17, 2026 13:55
Copilot AI review requested due to automatic review settings April 17, 2026 13:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Risk Rating: HIGH — Changes alter the release/publish pipeline’s post-build test triggering mechanism and could impact reliability of release validation.

This PR moves post-build test execution from a workflow_call-invoked workflow to a repository_dispatch-triggered workflow that can be fired after build/publish completes.

Changes:

  • Remove the post-build.yml reusable workflow previously invoked by build-publish.yml.
  • Add post-build-publish.yml to run post-build test workflows on repository_dispatch (build_publish_finished) with basic payload validation.
  • Emit a repository_dispatch event from build-publish.yml after docker-core completes; add a display name to the devenv-compat job.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/post-build.yml Removes the prior reusable post-build workflow entrypoint.
.github/workflows/post-build-publish.yml New repository_dispatch-triggered workflow to run post-build tests.
.github/workflows/build-publish.yml Adds dispatch emission job to trigger post-build tests.
.github/workflows/devenv-compat.yml Adds an explicit job name for clearer Actions UI display.

Scrupulous human review recommended for:

  • .github/workflows/build-publish.yml — the dispatch emission step (token permissions and failure behavior).
  • .github/workflows/post-build-publish.yml — job dependency graph to ensure validation properly gates all expensive jobs.

Comment thread .github/workflows/build-publish.yml
Comment thread .github/workflows/post-build-publish.yml
Comment thread .github/workflows/post-build-publish.yml
Comment thread .github/workflows/post-build-publish.yml
@Tofel Tofel force-pushed the dx-3584-post-build-tests-repository-dispatch branch from 525a57f to 8844e89 Compare April 17, 2026 14:08
@Tofel Tofel requested a review from Copilot April 17, 2026 14:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/build-publish.yml
Comment thread .github/workflows/build-publish.yml
Comment thread .github/workflows/post-build-publish.yml
Comment on lines +219 to +223
curl -L \
--fail-with-body \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Instead of using curl, what if we used the gh cli like:

  env:
   DOCKER_MANIFEST_TAG: ${{ needs.docker-core.outputs.docker-manifest-tag }}
  run: |
    gh api \
      --method POST \
      -H "Accept: application/vnd.github+json" \
      "/repos/${GITHUB_REPOSITORY}/dispatches" \
      --input - <<'JSON'
    {
      "event_type": "build_publish_finished",
      "client_payload": {
        "chainlink_image_tag": "${DOCKER_MANIFEST_TAG}",
        "chainlink_version": "${GITHUB_REF_NAME}"
      }
    }
    JSON

Comment on lines +7 to +10
permissions:
actions: read
id-token: write
contents: read
Copy link
Copy Markdown
Collaborator

@chainchad chainchad Apr 17, 2026

Choose a reason for hiding this comment

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

Suggested change
permissions:
actions: read
id-token: write
contents: read
permissions: {}

Always blank out default permissions and set the minimal privs on the job level as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants