Try to build and push the image

This commit is contained in:
Gervasio Marchand 2022-12-03 17:39:05 -03:00
parent cb02d954d1
commit 7413a91bbd
No known key found for this signature in database
GPG Key ID: B7736CB188DD0A38

View File

@ -11,22 +11,20 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0 # get entire git tree, required for nerdbank gitversioning
- name: Get version
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push the Docker image
shell: pwsh
run: |
cd src
Push-Location src
$version = (nbgv get-version -f json | ConvertFrom-Json).SimpleVersion
Write-Host "Version $version"
Write-Output "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Pop-Location
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build the hello-docker Docker image
# run: |
# docker build . --tag ghcr.io/g3rv4/fakerelay:latest
# docker run ghcr.io/deselikem/hello-docker-gcr-demo:latest
# docker push ghcr.io/deselikem/hello-docker-gcr-demo:latest
docker build . --tag ghcr.io/g3rv4/fakerelay:latest --tag "ghcr.io/g3rv4/fakerelay:$version"
docker push ghcr.io/g3rv4/fakerelay:latest
docker push "ghcr.io/g3rv4/fakerelay:$version"