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

feature(docker): Create docker container and push to ghcr #103

Merged
merged 1 commit into from
Jan 28, 2023

Conversation

heliocastro
Copy link
Contributor

@goneall Please consider make the gh packages repository for spdx public, so anyone can pull this image without the need to signin on github

@goneall
Copy link
Member

goneall commented Jan 27, 2023

@heliocastro I like the idea of creating a docker image. I personally don't have any experience with the GitHub action for publishing the docker image - so I have a couple questions:

  • What environment variables and secrets need to be setup in GitHub?
  • Should we only push released versions (which are always tagged) or push all versions?

@heliocastro heliocastro force-pushed the heliocastro/docker branch 2 times, most recently from 561b6ea to 862366c Compare January 28, 2023 13:52
@heliocastro
Copy link
Contributor Author

@heliocastro I like the idea of creating a docker image. I personally don't have any experience with the GitHub action for publishing the docker image - so I have a couple questions:

  • What environment variables and secrets need to be setup in GitHub?

No need, for this github already provide the necessary secrets for the repo. Is already on the PR. Look:

      - name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ${{ env.REGISTRY }}
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

Where's actor is spdx ( owner of the repo ) and password is generated by gh actions.

  • Should we only push released versions (which are always tagged) or push all versions?
    In the PR, since you do not have a release branch, i went to all push's to the master.
    Tagging is automated one coming from this action: https://github.com/docker/metadata-action, so i'm preparing the next version to be built only when you tag the release.

@heliocastro heliocastro force-pushed the heliocastro/docker branch 6 times, most recently from b45c2b7 to fd8c9de Compare January 28, 2023 14:08
Leverage tool with two possible usage methods:
- Straight from docker run and a regular entrypoint
- Inside docker image using wrapper `tools-java` available on PATH

Signed-off-by: Helio Chissini de Castro <heliocastro@gmail.com>
@heliocastro
Copy link
Contributor Author

@goneall Done, the current PR will build only when you add a tag v, and you don't need to care to modify the version on docker file.

@goneall
Copy link
Member

goneall commented Jan 28, 2023

Thanks @heliocastro - I'll go ahead and merge.

I'll may do a release relatively soon.

@goneall goneall merged commit 63e6583 into spdx:master Jan 28, 2023
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.

2 participants