-
Notifications
You must be signed in to change notification settings - Fork 181
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
Add github actions #334
Add github actions #334
Conversation
There was a non-rhel Dockerfile in images, so we will use that one instead |
.github/workflows/go.yml
Outdated
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.15 |
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.
What does the '^' symbol accomplish?
Latest golang is 1.16.
Also, do you think there's value iterating over a number of golang versions?
I have caught a build error before when I have built on newer golang versions. I was hoping to keep a list of the last 4 minor golang versions e.g. 1.16.x, 1.15.x, etc to ensure any changes still build at least across different golang versions. The builds are in parallel so it doesn't effect the speed of the workflow.
jobs:
build:
strategy:
matrix:
go-version: [1.13.x, 1.14.x, 1.15.x, 1.16.x]
os: [ubuntu-latest]
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.
In theory ^
is regex for "Start with", i.e. ^1.15 should match 1.15.x.
Your idea is good! I saw it in https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin/pull/332/files, I am just wondering if it works with the "x", can you please confirm it?
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.
Sure - See execution of multiple golang versions here: https://github.com/martinkennelly/network-resources-injector/actions/runs/627385214
.github/workflows/go.yml
Outdated
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: fmt |
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.
Is there any need for this task when make all
performs 'fmt' anyway?
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.
good point, thanks. It makes sense to remove it
images: ${{ env.IMAGE_NAME }} | ||
tag-latest: false | ||
|
||
- name: Build and push sriov-network-operator |
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.
sriov-network-operator
-> sriov-network-device-plugin
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.
thanks!
Hmm, i see #328 #329 #332 address build and test, so perhaps we should limit this to just the image push parts ? About the PR labeler workflow, i think it may need additional inputs from @zshi-redhat @pliurh if they found it useful in network operator. |
Ok! Let me just do the image push parts |
Signed-off-by: Manuel Buil <[email protected]>
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.
Thank you for the changes!
/cc @pliurh |
LGTM |
Based on the github actions in the sriov-operator project, add the same kind of actions here.
We did not have a non-rhel Dockerfile in this project, so I added one
Signed-off-by: Manuel Buil [email protected]