Pass version number as gh env when pushing Docker images

This commit is contained in:
Sergey Stepanov 2021-07-16 18:32:17 +03:00
parent dc151f6a0b
commit 69f18d19e4
No known key found for this signature in database
GPG key ID: A56B4929BAA8556B
2 changed files with 6 additions and 2 deletions

View file

@ -17,13 +17,15 @@ jobs:
- run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- run: echo "V=$(./scripts/version.sh)" >> $GITHUB_ENV
- uses: docker/build-push-action@v1
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
add_git_labels: true
tags: latest,${{ env.TAG }}
build_args: VERSION=$(./scripts/version.sh)
build_args: VERSION=${{ env.V }}
registry: docker.pkg.github.com
repository: ${{ github.REPOSITORY }}/cloud-game

View file

@ -15,13 +15,15 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: echo "V=$(./scripts/version.sh)" >> $GITHUB_ENV
- uses: docker/build-push-action@v1
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
add_git_labels: true
tags: dev
build_args: VERSION=$(./scripts/version.sh)
build_args: VERSION=${{ env.V }}
registry: docker.pkg.github.com
repository: ${{ github.REPOSITORY }}/cloud-game