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

Display build number in summary and support offsetting of Riff Raff Build number #20

Merged
merged 7 commits into from
Nov 14, 2022

Conversation

paulmr
Copy link
Member

@paulmr paulmr commented Nov 10, 2022

What does this change?

This change address what I believe is a common use case, where a project has switched from a previous build tool to GitHub actions, and we want the GitHub Actions Riff-Raff build number to start counting from the last build number in the previous tool.

This also adds a "Riff Raff" section to the job summary which outputs the build number selected (whether or not it has been modified).

How to test

If you provide the optional buildNumberOffset argument when calling this action, that value should be added to the build number (e.g. in the default case, without also providing a buildNumber parameter, this would get added to the GitHub Run Number).

If this optional parameter is not provided then the build number should remain unchanged.

In either case, after running the action, you should be able to click on the run to see it's summary, and at the bottom you will see a Riff Raff section outputting the build number.

An example of where I have run this on an actual build can be seen here:

https://github.com/guardian/kindle-publication-check/actions/runs/3439230129

Images

This is an example of the output added to the job summary:

image

@akash1810
Copy link
Member

This is excellent! Wonder if we should add more detail to the table? e.g. the Riff-Raff project name, a deep-link to Riff-Raff to deploy to CODE?

src/config.ts Outdated Show resolved Hide resolved
src/config.ts Outdated Show resolved Hide resolved
@paulmr
Copy link
Member Author

paulmr commented Nov 10, 2022

Thanks a lot reviewing Akash!

This is excellent! Wonder if we should add more detail to the table? e.g. the Riff-Raff project name, a deep-link to Riff-Raff to deploy to CODE?

Yes, I love this idea. I will admit I was being a little bit sheepish about adding too much to the summary in case we weren't happy to make a big deal out of it, but I think this is definitely a good idea to add more info.

@paulmr
Copy link
Member Author

paulmr commented Nov 10, 2022

I have updated this to default the offset to zero, and also added the project name to the build summary:

image

Copy link
Contributor

@nicl nicl left a comment

Choose a reason for hiding this comment

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

This is great :) will save a lot of time for people when migrating projects off Teamcity. And the table summary looks really helpful too.

action.yaml Show resolved Hide resolved
@akash1810
Copy link
Member

akash1810 commented Nov 25, 2022

I've made the v2.0.1 release for this now, and updated the v2 tag. Any projects using guardian/actions-riff-raff@v2 should see this wonderful annotation.

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.

None yet

3 participants