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

Setup and implement publishing Docker images to DockerHub #164

Closed
Tracked by #163
paullatzelsperger opened this issue Mar 29, 2023 · 0 comments
Closed
Tracked by #163

Setup and implement publishing Docker images to DockerHub #164

paullatzelsperger opened this issue Mar 29, 2023 · 0 comments
Assignees
Labels
docker Anything to do with docker images enhancement New feature or request

Comments

@paullatzelsperger
Copy link
Contributor

Description

When publishing Docker images to GitHub packages in an Eclipse-managed Github repository, they are automatically set to private. This is an org-wide setting and cannot be changed.

Thus, we must publish our docker images to DockerHub.

Requirements

  • image namespace and name must be defined as env variables
  • we must use org-provided credentials to log into Dockerhub:
     - name: DockerHub login
          if: github.event_name != 'pull_request'
          uses: docker/login-action@v2
          with:
            username: ${{ secrets.DOCKER_HUB_USER }}
            password: ${{ secrets.DOCKER_HUB_TOKEN }}
  • the README.md file must contain a Notice section, similar to the IRS example
  • the description (by default: README.md) must get published to DockerHub as well using a GH Actions:
      - name: Update Docker Hub description
          if: github.event_name != 'pull_request'
          uses: peter-evans/dockerhub-description@v3
          with:
            username: ${{ secrets.DOCKER_HUB_USER }}
            password: ${{ secrets.DOCKER_HUB_TOKEN }}
            repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}

Implementation proposal

  • leave publishing to GH Packages in for now, just to be safe
  • Extract building and pushing docker images to a separate GH workflow publish-docker.yaml
  • publish-docker.yaml runs only on pushes to develop and main and only if the Dockerhub credentials are present (prevents runs on forks)
@paullatzelsperger paullatzelsperger added the enhancement New feature or request label Mar 29, 2023
@paullatzelsperger paullatzelsperger moved this to Todo in EDC Board Apr 11, 2023
@paullatzelsperger paullatzelsperger self-assigned this Apr 11, 2023
@paullatzelsperger paullatzelsperger added the docker Anything to do with docker images label Apr 12, 2023
@paullatzelsperger paullatzelsperger moved this from Todo to In Progress in EDC Board Apr 12, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in EDC Board Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Anything to do with docker images enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant