Try setting environment variable
This commit is contained in:
parent
289f9ca08e
commit
9fefe30f64
2 changed files with 7 additions and 4 deletions
9
.github/workflows/build-and-test.yml
vendored
9
.github/workflows/build-and-test.yml
vendored
|
@ -7,13 +7,14 @@ jobs:
|
|||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install GitVersion
|
||||
uses: gittools/actions/gitversion/setup@v0
|
||||
uses: gittools/actions/gitversion/setup@v0.9.7
|
||||
with:
|
||||
versionSpec: '5.x'
|
||||
- uses: actions/checkout@v3
|
||||
- name: Determine Version
|
||||
uses: gittools/actions/gitversion/execute@v0
|
||||
id: gitversion
|
||||
uses: gittools/actions/gitversion/execute@v0.9.7
|
||||
- name: Semver
|
||||
run: echo $GITVERSION_SEMVER
|
||||
- name: Setup dotnet
|
||||
|
@ -31,6 +32,8 @@ jobs:
|
|||
shell: bash
|
||||
- name: Start containers
|
||||
run: docker-compose -f "docker-compose.yml" up -d --build
|
||||
env:
|
||||
VERSION: ${{ steps.gitversion.outputs.nuGetVersion }}
|
||||
- name: Wait for docker containers to setup
|
||||
run: sleep 30s
|
||||
shell: bash
|
||||
|
|
|
@ -18,7 +18,7 @@ services:
|
|||
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
|
||||
api:
|
||||
image: GitHubActionsDemo.Api:${GITVERSION_SEMVER}
|
||||
image: githubactionsdemo.api:${VERSION}
|
||||
build: .
|
||||
restart: always
|
||||
depends_on:
|
||||
|
|
Loading…
Reference in a new issue