Document and reference Github Actions for building and deploying func projects
Closed this issue · 13 comments
Building and Deploying functions can be performed purely by Github actions, without the need for any other tools.
This process needs to be documented and explained in the docs for people to be able to setup their repositories with these actions.
@ThomasVitale is already working on implementing some GitHub actions workflows here:
The work on the GitHub action is still in progress. In the meantime, this is an example of building and pushing an image using the func CLI explicitly in a GitHub Actions workflow: https://github.com/ThomasVitale/devoxxuk-question-1/blob/main/.github/workflows/commit-stage.yml#L72
@ThomasVitale I am really interested in your idea of creating a native action with Typescript, can you paste here some links to some references about what you had in mind?
If we start with something simple for just building and publishing the function artifacts to ghcr it will be great.
@salaboy After a few experiments, I came up with a possible solution for having support for func
in GitHub Actions. And the TypeScript option gives the most flexibility there.
A first action would be something like func-setup-action
for installing the func
CLI and make it available on the current runner. By default, it would install the latest version, but an optional parameter could be used to install a specific version. After that, it would be possible to use the func
CLI directly.
steps:
- uses: knative/func-setup-action@v1
- run: func version
For convenience, it could be useful to have some specialised actions for some of the operations provided by func
, like func-build-action
and func-deploy-action
.
steps:
- uses: knative/func-setup-action@v1
- uses: knative/func-build-action@v1
with:
path: .
publish: true
name: spring-boot-func
version: 3.9.4
The prerequisite for using any of those actions would be to have the runner already authenticated with a container registry, for example using the docker/login-action
or redhat-actions/podman-login
.
How does that sound?
I'm interested in the issue. Currently, I install the CLI using curl.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
/remove-lifecycle stale
Minor updates to @ThomasVitale in this PR: ThomasVitale/kn-func-build#1 which works to deploy to gcr.io, docker.io and other cloud repos.
We should discuss this in our weekly
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
/remove-lifecycle stale
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.