diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27c5b4ef..ec045302 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -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 @@ -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 @@ -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 diff --git a/docs/installation.md b/docs/installation.md index c94ef637..e1506e1c 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -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