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

CI configuration #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mateusz-rutski-red
Copy link

@mateusz-rutski-red mateusz-rutski-red commented Jan 23, 2023

Create Github Actions CI configuration for image push to Docker Hub

Configure workflow env variables to specify registry URL and namespace, by default images are pushed to Docker Hub in my personal namespace.

Configure authentication with registry by specifying project's secret variables (username and password)

@lg-vbo-hubot
Copy link

Can one of the admins verify this patch?

runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, '[ci skip]')"

services:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason the maven plugin io.fabric8:docker-maven-plugin which runs the following containers does not work within github worker. This declaration does that instead, and maven plugin execution is disabled via -Ddocker.skip=true flag


- name: Build and Test
run:
./mvnw --batch-mode --update-snapshots deploy
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added maven wrapper to ensure maven version consistency regardless of underlying github worker environment which executes our workflow.

@@ -252,6 +254,21 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a possibility of skipping maven artifact upload, since we don't need it to upload the image.


env:
REGISTRY_URL: docker.io
REGISTRY_NAMESPACE: mrutski
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please set the value to '${{ secrets.DOCKER_REGISTRY_USERNAME }}'?

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.

3 participants