-
Notifications
You must be signed in to change notification settings - Fork 405
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
chore: Added workflow for generating compatibility doc #2183
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1e5a896
chore: Added workflow for generating compatibility doc
jsumners-nr 685779c
tweak main ci workflow to not run all the time
jsumners-nr 29d0d7e
revert ci change that branch rule makes unhelpful
jsumners-nr acc99a9
update workflow
jsumners-nr 8ced987
run on "Create Release" workflow completing
jsumners-nr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Generate Compatibility Report | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
repo_target: | ||
description: Generate the report for the local repo, the docs repo, or both. | ||
required: true | ||
type: choice | ||
default: both | ||
options: | ||
- local | ||
- docs | ||
- both | ||
|
||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'test/versioned/**/package.json' | ||
|
||
jobs: | ||
local: | ||
runs-on: ubuntu-latest | ||
if: | ||
github.event_name == 'push' || | ||
(github.event_name == 'workflow_dispatch' && | ||
(inputs.repo_target == 'local' || inputs.repo_target == 'both')) | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: jaxxstorm/action-install-gh-release@71d17cb091aa850acb2a1a4cf87258d183eb941b | ||
with: | ||
repo: newrelic/newrelic-node-versions | ||
platform: linux | ||
arch: amd64 | ||
cache: enable | ||
- run: | | ||
nrversions -v -r . 2>status.log >./compatibility.md | ||
jsumners-nr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Upload generated artifacts for potential debugging purposes. | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: status.log | ||
path: status.log | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: compatibility.md | ||
path: compatibility.md | ||
|
||
# Generate the new PR to update the doc in the repo. | ||
- run: | | ||
git config user.name $GITHUB_ACTOR | ||
git config user.email gh-actions-${GITHUB_ACTOR}@github.com | ||
- run: | | ||
rm -f status.log | ||
- uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e | ||
bizob2828 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
with: | ||
title: "docs: Updated compatibility report" | ||
commit-message: "docs: Updated compatibility report" | ||
branch: "compatibility-report/auto-update" | ||
delete-branch: true | ||
base: main | ||
labels: "documentation" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is just saying re-run automatically when we add new versioned tests for a library. This seems very rare and more importantly would this run on a scheduled basis because the newer versions of a given library we instrument happens frequently. also, I'd see this getting run on release right?
You may want to add this like post release or but this in there right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is saying: "every time a push to the
main
branch occurs (i.e. a pull request was merged intomain
), and there have been changes to anypackage.json
file that resides undertest/versioned/
, run the workflow".We can add a scheduled run of this if it is desired. It would be a separate "on" block like the
workflow_dispatch
block.