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