mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 05:00:19 -05:00
move swagger build to ubuntu
This commit is contained in:
parent
eb14268646
commit
5037499c93
39
.github/workflows/build.yml
vendored
39
.github/workflows/build.yml
vendored
@ -40,6 +40,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Print environment
|
- name: Print environment
|
||||||
run: |
|
run: |
|
||||||
|
whoami
|
||||||
dotnet --info
|
dotnet --info
|
||||||
node --version
|
node --version
|
||||||
npm --version
|
npm --version
|
||||||
@ -110,7 +111,7 @@ jobs:
|
|||||||
STUB_OUTPUT=$(pwd)/docker-stub
|
STUB_OUTPUT=$(pwd)/docker-stub
|
||||||
docker run -i --rm --name setup -v $STUB_OUTPUT:/bitwarden bitwarden/setup:dev \
|
docker run -i --rm --name setup -v $STUB_OUTPUT:/bitwarden bitwarden/setup:dev \
|
||||||
dotnet Setup.dll -stub 1 -install 1 -domain bitwarden.example.com -os lin
|
dotnet Setup.dll -stub 1 -install 1 -domain bitwarden.example.com -os lin
|
||||||
sudo chown -R appveyor:appveyor $STUB_OUTPUT
|
sudo chown -R $(whoami):$(whoami) $STUB_OUTPUT
|
||||||
rm -rf $STUB_OUTPUT/letsencrypt
|
rm -rf $STUB_OUTPUT/letsencrypt
|
||||||
rm $STUB_OUTPUT/env/uid.env $STUB_OUTPUT/config.yml
|
rm $STUB_OUTPUT/env/uid.env $STUB_OUTPUT/config.yml
|
||||||
touch $STUB_OUTPUT/env/uid.env
|
touch $STUB_OUTPUT/env/uid.env
|
||||||
@ -122,6 +123,23 @@ jobs:
|
|||||||
name: docker-stub.zip
|
name: docker-stub.zip
|
||||||
path: ./docker-stub.zip
|
path: ./docker-stub.zip
|
||||||
|
|
||||||
|
- name: Build swagger
|
||||||
|
run: |
|
||||||
|
cd ./src/Api
|
||||||
|
dotnet swagger tofile --output ../../swagger.json --host https://api.bitwarden.com `
|
||||||
|
./obj/Docker/publish/Api/Api.dll public
|
||||||
|
cd ../..
|
||||||
|
shell: pwsh
|
||||||
|
env:
|
||||||
|
ASPNETCORE_ENVIRONMENT: Production
|
||||||
|
swaggerGen: 'True'
|
||||||
|
|
||||||
|
- name: Upload swagger.json artifact
|
||||||
|
uses: actions/upload-artifact@v2-preview
|
||||||
|
with:
|
||||||
|
name: swagger.json
|
||||||
|
path: ./swagger.json
|
||||||
|
|
||||||
- name: Log out of docker
|
- name: Log out of docker
|
||||||
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
||||||
run: docker logout
|
run: docker logout
|
||||||
@ -150,7 +168,6 @@ jobs:
|
|||||||
dotnet --info
|
dotnet --info
|
||||||
node --version
|
node --version
|
||||||
npm --version
|
npm --version
|
||||||
docker --version
|
|
||||||
Write-Output "GitHub ref: $env:GITHUB_REF"
|
Write-Output "GitHub ref: $env:GITHUB_REF"
|
||||||
Write-Output "GitHub event: $env:GITHUB_EVENT"
|
Write-Output "GitHub event: $env:GITHUB_EVENT"
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
@ -174,21 +191,3 @@ jobs:
|
|||||||
- name: Test solution
|
- name: Test solution
|
||||||
run: dotnet test .\test\Core.Test\Core.Test.csproj --configuration Debug --no-build
|
run: dotnet test .\test\Core.Test\Core.Test.csproj --configuration Debug --no-build
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
- name: Build swagger
|
|
||||||
run: |
|
|
||||||
cd .\src\Api
|
|
||||||
dotnet swagger tofile --output ..\..\swagger.json --host https://api.bitwarden.com `
|
|
||||||
.\bin\Debug\netcoreapp3.1\Api.dll public
|
|
||||||
cd ..\..
|
|
||||||
shell: pwsh
|
|
||||||
env:
|
|
||||||
ASPNETCORE_ENVIRONMENT: Production
|
|
||||||
swaggerGen: 'True'
|
|
||||||
|
|
||||||
- name: Upload swagger.json artifact
|
|
||||||
uses: actions/upload-artifact@v2-preview
|
|
||||||
with:
|
|
||||||
name: swagger.json
|
|
||||||
path: ./swagger.json
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user