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

Adding a new workflow to build a container image tagged main on PR merge #1155

Closed
qweeah opened this issue Oct 30, 2023 · 5 comments · Fixed by kranurag7/oras#1 or #1191
Closed

Adding a new workflow to build a container image tagged main on PR merge #1155

qweeah opened this issue Oct 30, 2023 · 5 comments · Fixed by kranurag7/oras#1 or #1191
Assignees
Labels
Milestone

Comments

@qweeah
Copy link
Contributor

qweeah commented Oct 30, 2023

It would be useful to have a Github workflow that automatically builds a container image whenever a PR is merged into the main branch. In this way, users can play with features from the latest version of the code easily via running a GHCR image without having to build it themselves.

@FeynmanZhou
Copy link
Member

@vsoch Are you expecting an ORAS image with a latest flag automatically built from the main branch for non-prod environment? Is this issue #1155 meet your expectation?

@qweeah For PRs that are not merged yet, what's the purpose of building an image? Is it for dev preview purposes?

@FeynmanZhou FeynmanZhou added the ci label Oct 31, 2023
@qweeah
Copy link
Contributor Author

qweeah commented Nov 1, 2023

@qweeah For PRs that are not merged yet, what's the purpose of building an image? Is it for dev preview purposes?

If a PR is not merged, it will not be included in the dev image.

@vsoch
Copy link
Contributor

vsoch commented Nov 1, 2023

If you find PRs are regular, you can also do a nightly or even bi-weekly build instead. That would accomplish the same I think and give you more control of the frequency.

@kranurag7
Copy link
Contributor

Hey @qweeah I took a look at the issue.
As of now, we don't have any image here with latest tag.

Details

$ oras repo tags ghcr.io/oras-project/oras
v0.12.0
v0.2.0-alpha.1
v0.2.1-alpha.1
v0.13.0
v0.14.0
v0.14.1
v0.15.0
v0.15.1
v0.16.0
v1.0.0-rc.1
v1.0.0-rc.2
v1.0.0
v1.1.0-rc.1
v1.0.1
v1.1.0-rc.2
v1.1.0

If you want to have the latest image tag whenever we create a commit on main then I can add another workflow similar to what we use to releasing image with tag.
The only requirement will be to removing the tags filter when the workflow is trigger.

tags:
- v*

Then the trigger for the new target will be:

on:
  push:
    branches: [main]

@qweeah
Copy link
Contributor Author

qweeah commented Nov 22, 2023

@kranurag7 Thanks for volunteering. main sounds more like a better option to me. latest should be used to point to a stable version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants