Skip to content

GH Actions for automatic build and push image#20

Open
inistor wants to merge 1 commit intoopenkilt:masterfrom
inistor:inistor-patch-docker-build
Open

GH Actions for automatic build and push image#20
inistor wants to merge 1 commit intoopenkilt:masterfrom
inistor:inistor-patch-docker-build

Conversation

@inistor
Copy link
Contributor

@inistor inistor commented Jul 26, 2024

Problem

An automated build is missing from openrepo; it is desired for two reasons:

  • make sure that the build is still passing following branch changes, before merge
  • have access to images built from branches, so developers can easily run tests with the changes from the branches
  • streamlined release process (creating a release/tag automatically builds the image and pushes it to docker hub)

Approach

Create a Github workflow using Docker provided actions to compute the tags, based on branch names and releases, run the build and push to Docker Hub.

A mapping of how the image tags are generated based on git tags and branches can be found here.

The workflow will run for all events (push, tags) except pull_request.

❗ In order for the Docker Hub push to work, the following must be defined in the repo:

  • A repository (⚠️ not environment) variable: DOCKERHUB_USERNAME. User for both login to Docker Hub and registry name for tagging
  • A secret: DOCKERHUB_TOKEN - a token generated from Docker Hub with read/write access to the target Hub repository. Used for retrieving info about the registry (by the docker/metadata-action action and for pushing the built image - by docker/build-push-action

The image for this PR is ionnistor/openrepo:inistor-patch-docker-build

@inistor inistor force-pushed the inistor-patch-docker-build branch from 8c47252 to cc4314e Compare July 26, 2024 07:45
@inistor inistor marked this pull request as ready for review July 26, 2024 10:30
@inistor inistor changed the title Inistor patch docker build GH Actions for automatic build and push image Aug 8, 2024
@inistor
Copy link
Contributor Author

inistor commented Aug 8, 2024

@matthill maybe you have some time to review/comment/approve this PR?

@inistor
Copy link
Contributor Author

inistor commented Aug 28, 2024

@matthill a quick reminder for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant