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

#192 push docker images to ghcr.io registry #203

Merged
merged 3 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ env:
go-version: '1.22.6'
python-version: 'pypy3.10'
cmd-name: 'greenmask'
docker-registry: greenmask/greenmask
docker-io-registry: greenmask
docker-image-name: greenmask

jobs:
unit-tests:
Expand Down Expand Up @@ -149,6 +150,13 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

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

- name: Get Git tag
id: git_tag
run: echo "TAG=$(git tag --points-at HEAD)" >> $GITHUB_ENV
Expand All @@ -160,7 +168,7 @@ jobs:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.docker-registry }}:${{ env.TAG }}
tags: ${{ env.docker-io-registry }}/${{ env.docker-image-name }}:${{ env.TAG }},ghcr.io/${{ github.repository }}:${{ env.TAG }}

- name: Build docker imaget with latest tag and push
uses: docker/build-push-action@v5
Expand All @@ -175,7 +183,7 @@ jobs:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.docker-registry }}:latest
tags: ${{ env.docker-io-registry }}/${{ env.docker-image-name }}:latest,ghcr.io/${{ github.repository }}:latest

deploy-docs:
runs-on: self-hosted
Expand Down
15 changes: 12 additions & 3 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,25 @@

## Via docker

You can find the docker images in the [Docker-hub page](https://hub.docker.com/r/greenmask/greenmask)
You can find the docker images in the:

To run the greenmask container, use the following command:
1. [Docker-hub page](https://hub.docker.com/r/greenmask/greenmask)

To run the greenmask container from DockerHub, use the following command:
```shell
docker run -it greenmask/greenmask:latest
```

2. GitHub container registry

To run the greenmask container from Github registry, use the following command:
```shell
docker run -it ghcr.io/GreenmaskIO/greenmask:latest
```

!!! info

For pre-releases (rc, beta, etc.), use explicit tags like `greenmaskio/greenmask:v0.2.0b2`.
For pre-releases (rc, beta, etc.), use explicit tags like `v0.2.0b2`.

## Via brew

Expand Down