Closed dnsmichi closed 4 years ago
Hi @dnsmichi thanks for the PR!
I'm not familiar with Github Actions but they look pretty cool. I like that it integrates with the repo without having to set up another account with CircleCI or whatever.
My initial thought is that it would be better to just build the docker image:
name: build
on: [push, pull_request]
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build the Docker image
run: docker build .
We already setup a go environment and run make
in the Dockerfile
, which is all this action achieves. I don't see a reason to do the same thing in two different ways.
We can change that, of course. I just saw that a manual build would always include make
, similar to how Prometheus itself runs CI. It only depends how deep you wanna go, e.g. run something after the build job, e.g. code coverage results and more. I do that within GitLab CI for example to generate build badges and add them to the README.md.
One thing worth noting with a Docker build - maybe adopt the workflow to push into GitHub's registry, and have that available next to DockerHub being down sometimes.
Thanks for the suggestions! I think I'm going to be making some wider changes to how the project is built, packaged and tested - after some discovery - so whatever comes out of that will affect the structure here.
Watch this space.
Sure thing, I don't have any stress. I was just using your awesome project within one of my environments and thought about contributing and giving back some in return. CI/CD is something where I have some experience and I am happy to help :)
Closing this PR. I went with the GHA I suggested here: https://github.com/ribbybibby/ssl_exporter/commit/80765ab97d53ea37ae57cb7b22374a55907eb581.
This invokes 'make' and ensures that all dependencies are installed. Especially bzr is required as otherwise 'make' fails.
The strategy matrix is already added to allow future Go version being added and tested automatically.
I wouldn't suggest to use Travis CI anymore. Other options would be integrations with Circle CI or GitLab CI.
refs #13