Skip to content

Add workflow for updating release used by start-proxy #2941

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

mbg
Copy link
Member

@mbg mbg commented Jun 23, 2025

This PR adds a new workflow which automates the creation of PRs that update which release is used by the start-proxy action to pull binaries of the update-job-proxy from.

Previously, I manually created PRs such as this one for that. The new workflow here creates similar ones, such as this example.

This PR currently contains a commit that adds a push trigger (limited to this branch) for testing, which should be removed before merging this PR.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@mbg mbg force-pushed the mbg/update-proxy-binaries branch from 7c89bca to e8ad3af Compare June 23, 2025 11:39
@mbg mbg marked this pull request as ready for review June 23, 2025 12:02
@Copilot Copilot AI review requested due to automatic review settings June 23, 2025 12:02
@mbg mbg requested a review from a team as a code owner June 23, 2025 12:02
Copy link
Contributor

@Copilot 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

This PR introduces a new GitHub Actions workflow to automate updating the start-proxy action’s release assets and opening draft PRs.

  • Adds a workflow dispatch and temporary push trigger for testing
  • Defines steps to replace URLs and versions in code, build, and open a PR
  • Configures branch naming and GitHub permissions for the bot
Comments suppressed due to low confidence (3)

.github/workflows/update-proxy-release.yml:5

  • Remove the temporary push trigger on the mbg/update-proxy-binaries branch before merging, as this is only needed for testing.
      - mbg/update-proxy-binaries # for testing

.github/workflows/update-proxy-release.yml:55

  • [nitpick] Trim the leading spaces in the heredoc for pr_body so the PR description renders as normal text instead of a code block.
            This PR updates the \`start-proxy\` action to use the private registry proxy binaries that

.github/workflows/update-proxy-release.yml:44

  • [nitpick] Avoid hard-coding the v2.0 prefix; derive the full release version from the RELEASE_TAG input so that future major/minor bumps don’t require patching this script.
          sed -i '' "s/\"v2.0.[0-9]*\"/\"v2.0.$NOW\"/g" ./src/start-proxy-action.ts

Copy link
Contributor

@esbena esbena left a comment

Choose a reason for hiding this comment

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

Is there prior art for doing releases like this?

I'm not a huge fan of doing text replacements in typescript files with workflow inputs...

contents: write # needed to push the updated files
pull-requests: write # needed to create the PR
env:
RELEASE_TAG: ${{ inputs.tag || 'codeql-bundle-v2.22.0' }}
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the plan for this default value moving forward?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's part of the test commit, which I noted in the PR description will be removed. So there will be no default value, and the tag input is required for the workflow_dispatch event.

@mbg
Copy link
Member Author

mbg commented Jun 23, 2025

I'm not a huge fan of doing text replacements in typescript files with workflow inputs...

Agreed, perhaps a check that the tag is in the expected format before proceeding would be good?

Is there prior art for doing releases like this?

Depends on what you are asking about specifically. This PR just automates a few steps we'd have to perform manually otherwise. The whole arrangement with how the update-job-proxy binaries are made available to the action has always been a bit temporary, but we haven't prioritised improvements here (see the linked epic).

@esbena
Copy link
Contributor

esbena commented Jun 23, 2025

Agreed, perhaps a check that the tag is in the expected format before proceeding would be good?

Yes. Let's add that in. It's also nice to have to prevent silly bugs.

Depends on what you are asking about specifically.

NP. Thanks for the extra context.

@mbg mbg force-pushed the mbg/update-proxy-binaries branch from 500d1d1 to 5446556 Compare June 23, 2025 16:48
@mbg mbg force-pushed the mbg/update-proxy-binaries branch 2 times, most recently from 45c20ef to 6e22e41 Compare June 23, 2025 17:00
@mbg mbg requested a review from esbena June 23, 2025 17:04
@mbg
Copy link
Member Author

mbg commented Jun 23, 2025

Yes. Let's add that in. It's also nice to have to prevent silly bugs.

Done, along with an additional check to make sure that the release actually exists. We could take this further to check that the release assets include the three expected files, but this is probably enough sanity checking in the workflow for now -- I am not expecting this to be used much. I'd only expect an increase in usage if we automate the process end-to-end, but we may well choose to store the proxy binaries elsewhere then.

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.

2 participants