Skip to content

Commit 2abed7b

Browse files
committed
Update GHA workflow
1 parent 27b0bb9 commit 2abed7b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+7
-60669
lines changed

.github/workflows/scrape.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,19 @@ jobs:
7171
- name: Run Spotify app - Daily 100
7272
shell: pwsh
7373
run: |
74+
$appsettings = Get-Content -Path ./samples/SpotifyPlaylist.ConsoleApp/appsettings.Development.sample.json | ConvertFrom-Json
75+
$appsettings.Azure.APIM.BaseUrl = "${{ secrets.APIM_BASE_URL }}"
76+
$appsettings.Azure.APIM.SubscriptionKey = "${{ secrets.APIM_SUBSCRIPTION_KEY }}"
77+
$appsettings | ConvertTo-Json -Depth 100 | Out-File -FilePath ./samples/SpotifyPlaylist.ConsoleApp/appsettings.Development.json -Force
78+
7479
$date = (Get-Date).ToUniversalTime().AddHours(9).ToString("yyyyMMdd")
7580
# $result = dotnet run --project ./samples/SpotifyPlaylist.ConsoleApp/ -- -t spotify -s ${{ secrets.SPOTIFY_PLAYLIST_ID }} --json | ConvertFrom-Json
7681
$result = dotnet run --project ./samples/SpotifyPlaylist.ConsoleApp/ -- -t spotify -s ${{ secrets.SPOTIFY_PLAYLIST_ID }} --json
7782
7883
mkdir -p ./data
7984
pushd ./data
80-
# $result | ConvertTo-Json -Depth 100 | Out-File -FilePath "spotify100-$date.json" -Force
81-
$result | Out-File -FilePath "spotify100-$date.json" -Force
85+
# $result[$($result.indexOf("{"))..$($result.Length-1)] | ConvertTo-Json -Depth 100 | Out-File -FilePath "spotify100-$date.json" -Force
86+
$result[$($result.indexOf("{"))..$($result.Length-1)] | Out-File -FilePath "spotify100-$date.json" -Force
8287
popd
8388
8489
- name: Upload data

0 commit comments

Comments
 (0)