Update API endpoint to secrets #20
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: BuildAndTestOnEveryPush.yml | |
| on: | |
| push: | |
| branches-ignore: | |
| - master | |
| jobs: | |
| UbuntuBuild: | |
| name: Build on ubuntu-latest | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: build docker container | |
| run: docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Salakala123!" -p 1433:1433 --name sql1 --hostname sql1 -d mcr.microsoft.com/mssql/server:2019-CU18-ubuntu-20.04 | |
| - name: Build | |
| run: dotnet build | |
| - name: Run SaveQueryToCsvTests | |
| run: dotnet test --filter Frends.Community.SQL.Tests.SaveQueryToCSVTests | |
| - name: Run TestBulkInsert | |
| run: dotnet test --filter Frends.Community.SQL.Tests.TestBulkInsert | |
| WindowsBuild: | |
| needs: UbuntuBuild | |
| name: Build on windows-latest | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: Build | |
| run: dotnet build | |
| - name: Test | |
| run: dotnet test --filter Frends.Community.SQL.Tests.SQLTest | |
| - name: Pack release version of task | |
| run: dotnet pack --configuration Release --include-source | |
| - name: Get package name | |
| id: package_name | |
| run: | | |
| $pkg = Get-ChildItem -Path . -Filter *.nupkg -Exclude *.symbols.nupkg -Recurse | Select-Object -First 1 | |
| echo "full_name=$($pkg.FullName)" >> $env:GITHUB_OUTPUT | |
| - name: Push to Frends Community Test Feed | |
| shell: bash | |
| run: | | |
| curl -X POST "${{ secrets.COMMUNITY_TASKS_API }}?feed_type=test" \ | |
| -H "x-api-key: ${{ secrets.FRENDS_COMMUNITY_TASKS_API_KEY }}" \ | |
| -H "Content-Type: application/octet-stream" \ | |
| --data-binary @"${{ steps.package_name.outputs.full_name }}" |