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

Add the docker image to the GitHub image registry #28

Open
btschwertfeger opened this issue May 9, 2023 · 0 comments
Open

Add the docker image to the GitHub image registry #28

btschwertfeger opened this issue May 9, 2023 · 0 comments
Assignees
Labels
CI/CD Could Something that could be cool bit is not really important

Comments

@btschwertfeger
Copy link
Owner

Is your feature request related to a problem? Please describe.
GitHub provides a space to store docker images. These are shown on the right side of the repository under the optional "packages" entry.

Solution proposal:

# publish_ghcr.yaml
name: Publish GHCR
on:
  push:
    branches:
      - "master"
jobs:
  publish-hello-docker-image:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Login to GitHub Container Registry
        uses: docker/login-action@v1
        with:
          registry: ghcr.io
          username: ${{ github.username }}
          password: ${{ secrets.GITHUB_TOKEN }}
      - name: Build the hello-docker Docker image
        run: |
          docker build . --tag ghcr.io/btschwertfeger/BiasAdjustCXX:latest
          docker run ghcr.io/btschwertfeger/BiasAdjustCXX:latest
          docker push ghcr.io/btschwertfeger/BiasAdjustCXX:latest
@btschwertfeger btschwertfeger added Could Something that could be cool bit is not really important CI/CD labels May 9, 2023
@btschwertfeger btschwertfeger self-assigned this May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Could Something that could be cool bit is not really important
Projects
None yet
Development

No branches or pull requests

1 participant