Skip to content

Commit

Permalink
Merge pull request #203 from GreenmaskIO/feature/docker-images-to-ghc…
Browse files Browse the repository at this point in the history
…r-io

#192 push docker images to ghcr.io registry
  • Loading branch information
wwoytenko authored Oct 1, 2024
2 parents c10ff17 + 464d9db commit 559b7f1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
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

0 comments on commit 559b7f1

Please sign in to comment.