Skip to content

Commit

Permalink
#192 push docker images to ghcr.io registry
Browse files Browse the repository at this point in the history
tarbaev-vl committed Sep 30, 2024
1 parent c10ff17 commit 04e930e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 04e930e

Please sign in to comment.