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

chore: migrate github-action to cli #1487

Merged
merged 25 commits into from
Oct 6, 2024

Conversation

akshatnema
Copy link
Member

@akshatnema akshatnema commented Jul 28, 2024

Description

PR to add the github action for cli from https://github.com/asyncapi/github-action-for-cli.

Related issue(s)
asyncapi/github-action-for-cli#396

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@aeworxet
Copy link
Contributor

@asyncapi/bounty_team

github-action/Dockerfile Fixed Show fixed Hide fixed
@asyncapi-bot asyncapi-bot added the bounty AsyncAPI Bounty program related label label Aug 21, 2024
@Shurtu-gal
Copy link
Collaborator

/u

@Shurtu-gal
Copy link
Collaborator

@akshatnema any blockers being faced by you?

@akshatnema
Copy link
Member Author

There is no update as I'm researching around the fact on how to manage GitHub Action for CLI.

@Shurtu-gal and @derberg proposals require different configurations, which in fact means we need to have the same package.json for both CLI and it's respective GitHub action.

I'm currently looking at how to use only one configuration and one package.json.

Although the matter looks simple, it will take time to try different approaches, so if I don't achieve a break-through in the nearest couple of days, I'll ask for the Timeline Extension.

Copy link
Member

derberg commented Sep 17, 2024

but the GH action do not need package.json as it is bash and docker based only. So no need for monorepo afaik - I think we talked about it

@akshatnema
Copy link
Member Author

akshatnema commented Sep 18, 2024

@derberg @Shurtu-gal ok so should we do it in a manner that we completely remove the package.json from github action? Since, there is no need of a separate package.json, our whole github action depends on the working of entrypoint.sh and the versioning for github action scripts can be added to existing package.json of cli, right?

@Shurtu-gal
Copy link
Collaborator

@derberg @Shurtu-gal ok so should we do it in a manner that we completely remove the package.json from github action? Since, there is no need of a separate package.json, our whole github action depends on the working of entrypoint.sh and the versioning for github action scripts can be added to existing package.json of cli, right?

That's correct. If I remember correctly the package.json was there just to support the workflows already present.

RUN addgroup -S myuser && adduser -S myuser -G myuser

# Install necessary packages
RUN apk add --no-cache bash git chromium

Check notice

Code scanning / SonarCloud

Arguments in long RUN instructions should be sorted Low

Sort these package names alphanumerically. See more on SonarCloud
@Shurtu-gal
Copy link
Collaborator

@akshatnema sonarcloud is complaining about the Dockerfile building on a image with root as the default user. Maybe the user being added could be used for further steps through

USER myuser

I may have missed out on this during migrating to bash.

@Shurtu-gal Shurtu-gal changed the title New Github action added for cli feat: migrate github-action to cli Oct 4, 2024
@Shurtu-gal
Copy link
Collaborator

/u

Copy link
Collaborator

@Shurtu-gal Shurtu-gal left a comment

Choose a reason for hiding this comment

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

Could you add the test-workflow as well to see if the action is working as intended?

- name: Build Docker image and export
uses: docker/build-push-action@v5
with:
context: .
Copy link
Collaborator

Choose a reason for hiding this comment

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

The context should be different I believe as the DockerFile is inside github-action folder.

@Shurtu-gal Shurtu-gal marked this pull request as ready for review October 5, 2024 10:35
@Shurtu-gal
Copy link
Collaborator

@aeworxet this issue is pretty complicated as some things related to containerizing part is still not working and we still have to do the automation of version locking and bumping. @akshatnema is also pretty new to the CLI repo so is it possible to reclassify this bounty as advanced and extend it for 1-2 weeks.

Copy link

sonarcloud bot commented Oct 6, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarCloud

Copy link
Collaborator

@Shurtu-gal Shurtu-gal left a comment

Choose a reason for hiding this comment

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

LGTM. The version automation part would be done in a separate PR.

@Shurtu-gal Shurtu-gal changed the title feat: migrate github-action to cli chore: migrate github-action to cli Oct 6, 2024
@Shurtu-gal Shurtu-gal merged commit 2f9ccbb into asyncapi:master Oct 6, 2024
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty AsyncAPI Bounty program related label
Projects
Status: Completed
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants