Move from Travis CI to github actions - #698
Conversation
Signed-off-by: Akos Veres <veres@akos.me>
Signed-off-by: Akos Veres <veres@akos.me>
|
Additional question is: do we want to push images when tags get released? That would be new functionality and I was not sure if it's something we want to add now or as a separate PR? |
|
Yes definitely and that shouldn't be new behaviour as we do that now with Travis. |
Signed-off-by: Akos Veres <veres@akos.me>
|
More questions:
Actions on the repository owners side to make this PR pass:
|
Upon release tags along with the tag itself.
I think it is acceptable to only run e2e tests in a "ci-only" run (git push/PR) and to just release images in the "publish" job. This is the strategy I took with the example I shared on yesterday's call. https://github.com/alexellis/registry-creds/tree/master/.github/workflows
Will do 👍 |
| =========== | ||
|
|
||
| [](https://travis-ci.com/openfaas/faas-netes) | ||
| [](https://github.com/openfaas/faas-netes/actions) |
There was a problem hiding this comment.
Nice, I actually forgot about this.
| @@ -0,0 +1,69 @@ | |||
| name: publish | |||
There was a problem hiding this comment.
Let's call the file publish as per the reference examples.
| run: ./contrib/run_function.sh | ||
| - name: stop dev cluster | ||
| run: ./contrib/stop_dev.sh | ||
| - name: Sleep for 10 seconds |
There was a problem hiding this comment.
Can you do an inline GitHub script instead if a wait is needed? Third-party actions are disabled.
There was a problem hiding this comment.
| - name: deploy deploy | ||
| run: OPERATOR=0 ./contrib/deploy.sh | ||
| - name: run function | ||
| run: ./contrib/run_function.sh |
There was a problem hiding this comment.
Might be nice to OPERATOR=0 for consistency
| uses: docker/build-push-action@v2 | ||
| with: | ||
| outputs: "type=registry,push=true" | ||
| platforms: linux/amd64,linux/arm/v6,linux/arm64 |
There was a problem hiding this comment.
We can do arm/v7 for Docker images, arm/v6 for published binaries
| - name: Push containers | ||
| uses: docker/build-push-action@v2 | ||
| with: | ||
| outputs: "type=registry,push=true" |
There was a problem hiding this comment.
I am conflicted about filling up the storage with images upon each commit into HEAD. Let's remove this for the time being.
There was a problem hiding this comment.
If people want to try out solutions before their release via a tag, this might be beneficial. We could have a separate flow for pushing in to master for just this specifically, for the time being I'll remove the publishing of the images tho, as requested.
| run: ./contrib/lint_chart.sh | ||
| - name: create cluster | ||
| run: ./contrib/create_cluster.sh | ||
| - name: deploy deploy |
There was a problem hiding this comment.
Let's only run these tests during the "push" / "pr" events?
alexellis
left a comment
There was a problem hiding this comment.
Looks really good. Some comments were added for your input.
|
I believe I fixed most of the issues in the comments, feel free to look at it again. |
* Run function with OPERATOR=0 * Use github-script instead of custom wait-action * Remove push of container during CI run * Rename tag file to publish * Build armv7 images Signed-off-by: Akos Veres <veres@akos.me>
| - name: stop dev cluster | ||
| run: ./contrib/stop_dev.sh | ||
| - name: wait 10 seconds | ||
| run: sleep 10 |
There was a problem hiding this comment.
Much better. I was thinking of this when out walking today.
This was missed in #698 Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This was missed in #698 Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This was missed in #698 Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
Description
The pull request has the following changes:
Motivation and Context
It fixes GitHub Actions Migration - tracking issue faas#1585
How Has This Been Tested?
The workflow has been tested on my private fork, all steps have completed successfully, except the push to github container registry.
Link to latest build https://github.com/akosveres/faas-netes/runs/1354594029?check_suite_focus=true
Types of changes
Checklist:
git commit -s