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

ci: upgrade some actions related to planned GH deprecations #226

Merged
merged 19 commits into from
Apr 13, 2023

Conversation

derberg
Copy link
Member

@derberg derberg commented Apr 4, 2023

actions bumps forced by node12 -> node16:

  • Upgrade checkout action to actions/checkout@v3. It is safe as they bumped from v2 to v3 only to upgrade the node runner to node 16. No breaking changes
  • Upgrade script action to actions/github-script@v6. There were breaking changes in v5 only, v6 was just node engine update. Only one workflow needed a refactor to github.rest
  • Upgrade to latest pascalgn/automerge-action. No breaking changes, just for node engine deprecation
  • Upgrade to latest hmarr/auto-approve-action. No breaking changes, just for node engine deprecation
  • Upgrade docker actions from if-docker-pr-testing.yml workflow. No breaking changes, just for node engine deprecation
  • Upgrade go actions from if-go-pr-testing.yml workflow. No breaking changes, just for node engine deprecation
  • Upgrade actions/setup-node to v3. Node engine related. There is one breaking change that do not relate to us, to use node-version input instead of version - but that was always done
  • Upgrade to latest peter-evans/create-pull-request. There are some breaking changes related to add-paths but we are no using it. We need to upgrade because of node enginge
  • Upgrade to latest amannn/action-semantic-pull-request because of node.
  • Upgrade to latest marocchino/sticky-pull-request-comment - node
  • Upgrade to latest derberg/npm-dependency-manager-for-your-github-org - node
  • Upgrade to latest m1ner79/Github-Twittction -node

removal of one action

Remove sentiment-analysis.yml - it will not work because of node deprecation. The fact is that this action is not working for few months already, it was never good because of lack of context and was 100% of time causing false positives

stop using actions-ecosystem/action-create-comment

Looks like actions-ecosystem/action-create-comment is not maintained and they did not bump version for node16. I removed it from help-command.yml and now use GitHub API directly in script action

stop using LoveToKnow/slackify-markdown-action

Unfortunately LoveToKnow/slackify-markdown-action is not very much maintained and there is a PR to change to node16 for months, not merged.

Now we do not use this action but for the first time we will use composite action -> https://github.com/asyncapi/.github/pull/226/files#diff-dacdba02324430e1c58a8c5262cf680d96abfc8ca95a5b3500cc9aa9ef10d155
I'm personally in love with composite actions and think we can optimize our CI with it a lot. Important to notice there composite actions do not have to be replicated with global workflow in multiple repos, can be referenced from this repo

this was tested in my test repo:

refactor set-output

set-output goes away -> https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

so they had to be refactored to a new way

@derberg derberg marked this pull request as ready for review April 6, 2023 08:22
@derberg
Copy link
Member Author

derberg commented Apr 6, 2023

cc @KhudaDad414 please review 🙏🏼 not an easy one

cc @14Richa would be cool if you could this time contribute as reviewer 🙏🏼

cc @saurav9878 maybe you wanna have a look

Copy link
Member

@KhudaDad414 KhudaDad414 left a comment

Choose a reason for hiding this comment

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

LGTM! left some comments.

.github/actions/slackify-markdown/action.yml Outdated Show resolved Hide resolved
.github/actions/slackify-markdown/action.yml Outdated Show resolved Hide resolved
.github/workflows/help-command.yml Show resolved Hide resolved
@@ -14,11 +14,13 @@ jobs:
name: Slack - notify on every release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Copy link
Member

Choose a reason for hiding this comment

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

What is the point of these checkouts? I assume it is because of asyncapi/.github/.github/actions/slackify-markdown@master, but why?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, they are actually not needed, good 🦅 👁️
checkout was needed as I could not figure out how to get these new types of actions from the remote repository, so idea was to replicate it and therefore checkout was needed to run them

Copy link
Member Author

Choose a reason for hiding this comment

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

it is actually needed, because the new composite action installs some dependencies, and I use cache there, and it needs to update cache somewhere, so basically without checkout this action fails

Co-authored-by: Khuda Dad Nomani <32505158+KhudaDad414@users.noreply.github.com>
This was referenced May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants