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

Update Release Notes to use Node v16 #1561

Closed
dfreilich opened this issue Nov 27, 2022 · 6 comments · Fixed by #1562
Closed

Update Release Notes to use Node v16 #1561

dfreilich opened this issue Nov 27, 2022 · 6 comments · Fixed by #1562
Labels
github_actions Pull requests that update Github_actions code good first issue A good first issue to get started with. size/sm Small level of effort type/chore Issue that requests non-user facing changes. type/research Issue intended to be exploratory.

Comments

@dfreilich
Copy link
Member

Description

We have a Github Action to generate our release notes, which uses Node 12. That will soon be deprecated by Github (see more here)

This issue is mentioned as an annotation on this job: https://github.com/buildpacks/pack/actions/runs/3558882069

Proposed solution

We should do one of two things:

  • Upgrade the action to use Node 16, if that is easy

Alternatively, or in addition, we may want to investigate using another public action for generating release notes, which doesn't seem like a core part of our workflow (and can therefore be better done by another action).

Additional context

https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/

@dfreilich dfreilich added size/sm Small level of effort good first issue A good first issue to get started with. type/chore Issue that requests non-user facing changes. type/research Issue intended to be exploratory. github_actions Pull requests that update Github_actions code labels Nov 27, 2022
@SaumyaBhushan
Copy link
Contributor

Hi @dfreilich I would like to pick this one .

@SaumyaBhushan
Copy link
Contributor

@dfreilich @natalieparellano Can you please review the pull request

@joe-kimmel-vmw
Copy link
Contributor

Hi @dfreilich I did some ~lightweight validation suggesting that this will work.

steps:

1.) install act https://github.com/nektos/act
2.) make a valid github PAT and save it in local env as GITHUB_TOKEN
3.) after some fiddling, delete most of build.yaml since we really only need to test the changelog step and I couldn't get other steps to work :)
4.) hardcode the "milestone" variable because i couldn't get that to pass in correctly? idk... so in the end it just looks like this:

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Generate changelog
        uses: ./.github/workflows/actions/release-notes
        id: changelog
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          milestone: 0.0.1
      - name: test changelog
        run: |
            echo "${{ steps.changelog.outputs.contents }}"

4.) act -j build -j release -s GITHUB_TOKEN
with output:

[build/release] 🚀  Start image=catthehacker/ubuntu:act-latest
[build/release]   🐳  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=false
[build/release]   🐳  docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[build/release]   🐳  docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[build/release] ⭐ Run Main actions/checkout@v3
[build/release]   🐳  docker cp src=/Users/jkimmel/go/src/github.com/joe-kimmel-vmw/pack/. dst=/Users/jkimmel/go/src/github.com/joe-kimmel-vmw/pack
[build/release]   ✅  Success - Main actions/checkout@v3
[build/release] ⭐ Run Main Generate changelog
[build/release]   🐳  docker exec cmd=[node /Users/jkimmel/go/src/github.com/joe-kimmel-vmw/pack/.github/workflows/actions/release-notes/dist/index.js] user= workdir=
| looking up PRs for milestone 0.0.1 in repo joe-kimmel-vmw/pack
| Issues count: 0
| type/enhancement issues: 0
| type/bug issues: 0
| breaking-change issues: 0
| experimental issues: 0
| Issues not displayed:  0
| GENERATED CHANGELOG
| =========================
|  ## Contributors
|
| We'd like to acknowledge that this release wouldn't be as good without the help of the following amazing contributors:
[build/release]   ⚙  ::set-output:: contents=## Contributors

We'd like to acknowledge that this release wouldn't be as good without the help of the following amazing contributors:
[build/release]   ✅  Success - Main Generate changelog
[build/release] ⭐ Run Main test changelog
[build/release]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2] user= workdir=
| ## Contributors
|
| We'd like to acknowledge that this release wouldn't be as good without the help of the following amazing contributors:
[build/release]   ✅  Success - Main test changelog
[build/release] 🏁  Job succeeded

the important part imo is that the changelog was run with the node16 config and didn't throw any errors. obviously it's kind of a "null object" dataset since there's no real milestone tag and no PRs, but this suggests to me that it's reasonable to merge this change.

@Dhruv-Sachdev1313
Copy link

Hey @joe-kimmel-vmw, Do you want me to test this out?

@joe-kimmel-vmw
Copy link
Contributor

Hey @joe-kimmel-vmw, Do you want me to test this out?

sure!

@Dhruv-Sachdev1313
Copy link

Hey @joe-kimmel-vmw, Do you want me to test this out?

sure!

Woops, I am sorry I read you previous comment wrong, I see you have already validated this!
I am sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update Github_actions code good first issue A good first issue to get started with. size/sm Small level of effort type/chore Issue that requests non-user facing changes. type/research Issue intended to be exploratory.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants