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

Automatically publish conatiner image #470

Merged
merged 1 commit into from
May 29, 2024
Merged

Conversation

lkiesow
Copy link
Member

@lkiesow lkiesow commented May 27, 2024

This patch adds a Dockerfile and a GitHub Actions workflow to automatically build and publish container images for every branch and pull request.

If the source is a pull request, the workflow will also add a comment to explain how this can be used to easily test this pull request:

Use docker or podman to test this pull request locally.

Local test with mock data

podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/lkiesow/opencast-admin-interface:pr-5

Proxy data from develop.opencast.org

podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://develop.opencast.org ghcr.io/lkiesow/opencast-admin-interface:pr-5

It may take a few seconds for the interface to spin up.
It will then be available at https://127.0.0.1:3000.

Right now, this will run on all pull requests instead of just running on pull requests for members of the team Developer like we have for the Opencast Editor. We have to authorize unknown contributors anyway before GitHub runs workflows at all and we also only use the package repository for testing.

This patch adds a `Dockerfile` and a GitHub Actions workflow to
automatically build and publish container images for every branch and
pull request.

If the source is a pull request, the workflow will also add a comment to
explain how this can be used to easily test this pull reqzest:

> Use `docker` or `podman` to test this pull request locally.
>
> Local test with mock data
> ```
> podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/lkiesow/opencast-admin-interface:pr-5
> ```
>
> Proxy data from develop.opencast.org
> ```
> podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://develop.opencast.org ghcr.io/lkiesow/opencast-admin-interface:pr-5
> ```
>
> It may take a few seconds for the interface to spin up.
> It will then be available at https://127.0.0.1:3000.
@mtneug
Copy link
Member

mtneug commented May 28, 2024

[...] and we also only use the package repository for testing.

Please don't make that assumption. I want to add production-ready images for all static front-end repositories (similar to opencast/opencast-editor#684).

@lkiesow
Copy link
Member Author

lkiesow commented May 28, 2024

As we discussed at the technical meeting:

  • This is just for now
  • This shouldn't conflict with prod containers

@ziegenberg ziegenberg added the type:infrastructure Build process, deployment, workflows label May 29, 2024
@ziegenberg ziegenberg self-assigned this May 29, 2024
@ziegenberg
Copy link
Member

Looks fine to me.

@ziegenberg ziegenberg merged commit ddfd555 into opencast:main May 29, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:infrastructure Build process, deployment, workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants