This file contains 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: .NET Continue Integration | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
Continue-Integration: | |
runs-on: ubuntu-latest | |
environment: Release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Update JSON File | |
run: | | |
# Get the new values from the previous step's outputs | |
clientid="${{ secrets.CLIENTID }}" | |
clientsecretid="${{ secrets.CLIENTSECRETID }}" | |
accesstoken="${{ secrets.ACCESSTOKEN }}" | |
refreshtoken="${{ secrets.CLIENTSECRETID }}" | |
appname="${{ secrets.APPNAME }}" | |
accountid="${{ secrets.ACCOUNTID }}" | |
projectid="${{ secrets.PROJECTID }}" | |
messageboardid="${{ secrets.MESSAGEBOARDID }}" | |
todosetsid="${{ secrets.TODOSETSID }}" | |
vaultid="${{ secrets.VAULTID }}" | |
campfireid="${{ secrets.CAMPFIREID }}" | |
scheduleid="${{ secrets.SCHEDULEID }}" | |
questionnaireid="${{ secrets.QUESTIONNAIREID }}" | |
inboxid="${{ secrets.INBOXID }}" | |
kanbanid="${{ secrets.KANBANID }}" | |
# Update the JSON file using jq | |
jq --arg clientid "$clientid" --arg clientsecretid "$clientsecretid" --arg appname "$appname" --arg accountid '$accountid' --arg projectid "$projectid" --arg messageboardid "$messageboardid" --arg todosetsid "$todosetsid" --arg vaultid "$vaultid" --arg campfireid "$campfireid" --arg scheduleid "$scheduleid" --arg questionnaireid "$questionnaireid" --arg inboxid "$inboxid" --arg kanbanid "$kanbanid" '.ClientId = $clientid | .ClientSecretId = $clientsecretid | .AppName = $appname | .AccountId = $accountid | .ProjectId = $projectid | .MessageBoardId = $messageboardid | .TodosetsId = $todosetsid | .VaultId = $vaultid | .CampfireId = $campfireid | .ScheduleId = $scheduleid | .QuestionnaireId = $questionnaireid | .InboxId = $inboxid | .KanbanId = $kanbanid' tests/appsettings.json > updated_appsettings.json | |
# Update the JSON file using jq | |
jq --arg accesstoken "$accesstoken" --arg refreshtoken "$refreshtoken" --arg refreshtoken "$refreshtoken" '.access_token = $accesstoken | .refresh_token = $refreshtoken' tests/basecamp.json > updated_basecamp.json | |
# Overwrite the original file with the updated contents | |
mv updated_appsettings.json tests/appsettings.json | |
mv updated_basecamp.json tests/basecamp.json | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Build and Test | |
run: ./build.ps1 | |
shell: pwsh |