Skip to content

chore(ci/release): Re-factor fluent-operator release process#1950

Open
joshuabaird wants to merge 13 commits intofluent:masterfrom
joshuabaird:chore/refactor-release
Open

chore(ci/release): Re-factor fluent-operator release process#1950
joshuabaird wants to merge 13 commits intofluent:masterfrom
joshuabaird:chore/refactor-release

Conversation

@joshuabaird
Copy link
Copy Markdown
Collaborator

Fixes #1949.

TODO:

  • Enable "Default to PR title for squash merge commits" in GitHub Settings --> Pull Requests
  • Add "Lint PR Title" as a required status check in branch protection settings for master

Signed-off-by: Josh Baird <jbaird@galileo.io>
Signed-off-by: Josh Baird <jbaird@galileo.io>
Signed-off-by: Josh Baird <jbaird@galileo.io>
Signed-off-by: Josh Baird <jbaird@galileo.io>
Signed-off-by: Josh Baird <jbaird@galileo.io>
@joshuabaird joshuabaird marked this pull request as ready for review May 6, 2026 18:08
Copilot AI review requested due to automatic review settings May 6, 2026 18:08
@joshuabaird joshuabaird changed the title Re-factor fluent-operator release process chore(ci/release): Re-factor fluent-operator release process May 6, 2026
Signed-off-by: Josh Baird <jbaird@galileo.io>
Signed-off-by: Josh Baird <jbaird@galileo.io>
Signed-off-by: Josh Baird <jbaird@galileo.io>
name: Lint PR Title

on:
pull_request_target:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is always a concern so let's make sure we're secure with it - it's part of the recent supply chain attacks.

I think we should at least comment why it is required and the mitigations in place for future reviews/changes to ensure we do not open things up.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for calling this out -- this is a valid concern.

One key thing here to call out is that this workflow is not checking out any code (eg, using actions/checkout) which is what allowed attacker-controlled code execution in the mentioned supply chain attacks.

I have attempted to harden this workflow a bit in 55357df:

  • Added a comment about the need for pull_request_target and a warning against adding checkout functionality to the workflow
  • Removed the synchronize type since PR title changes only occur on opened, reopened and edited events. The synchronize type fires on every new commit push and is unnecessary for this use-case
  • Removed top-level permissions and only grant needed access at the job-level to prevent accidental inheritence
  • Added a CODEOWNERS so that only users who are "Admins" of this repo can modify files in the .github/ directory

required: false
type: string

permissions:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The docs suggest it needs issues: write as well so do we (and if not maybe indicate why)?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

From what I understand: release-please <4.0 did use "issues" to track the replace process but >=4.0 removed the issue-based workflow any only uses PRs/git tags for driving the release process.

release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for this, had a hand crafted approach for our stuff so useful to know.

Comment thread README.md

```shell
kubectl apply -f https://raw.githubusercontent.com/fluent/fluent-operator/release-3.7/manifests/setup/setup.yaml
kubectl apply -f https://github.com/fluent/fluent-operator/releases/latest/download/setup.yaml
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Does this work now? It used to intercept and provide you with HTML if you did not use the raw endpoint

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah - it looks like it does work now. I wonder if this recently changed. I do recall exactly what you're talking about.

@patrick-stephens
Copy link
Copy Markdown

Can we verify these run ok before merge as well with something like act? I hate the fact you cannot test new workflows properly until they are merged.

It looks like we do not run actionlint or anything at the moment so we really should add that in too.

Signed-off-by: Josh Baird <jbaird@galileo.io>
Signed-off-by: Josh Baird <jbaird@galileo.io>
Signed-off-by: Josh Baird <jbaird@galileo.io>
@joshuabaird
Copy link
Copy Markdown
Collaborator Author

Can we verify these run ok before merge as well with something like act? I hate the fact you cannot test new workflows properly until they are merged.

It looks like we do not run actionlint or anything at the moment so we really should add that in too.

Yeah - testing GHA is always cumbersome.

Adding actionlint is a great idea. Will incorporate that into this PR as well.

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.

Re-factor fluent-operator release process

2 participants