|
42 | 42 | $installer = "$($playwright[0].Directory.FullName)/playwright.ps1" |
43 | 43 | & "$installer" install |
44 | 44 |
|
45 | | - - name: Run scraper app - Top 100 |
| 45 | + - name: Run Melon app - Melon Top 100 |
46 | 46 | shell: pwsh |
47 | 47 | run: | |
48 | 48 | $date = (Get-Date).ToUniversalTime().AddHours(9).ToString("yyyyMMdd") |
|
55 | 55 | $result | Out-File -FilePath "top100-$date.json" -Force |
56 | 56 | popd |
57 | 57 |
|
58 | | - - name: Run scraper app - Daily 100 |
59 | | - shell: pwsh |
60 | | - run: | |
61 | | - $date = (Get-Date).ToUniversalTime().AddHours(9).ToString("yyyyMMdd") |
62 | | - # $result = dotnet run --project ./samples/MelonChart.ConsoleApp/ -- -c Daily100 --json | ConvertFrom-Json |
63 | | - $result = dotnet run --project ./samples/MelonChart.ConsoleApp/ -- -c Daily100 --json |
64 | | -
|
65 | | - mkdir -p ./data |
66 | | - pushd ./data |
67 | | - # $result | ConvertTo-Json -Depth 100 | Out-File -FilePath "daily100-$date.json" -Force |
68 | | - $result | Out-File -FilePath "daily100-$date.json" -Force |
69 | | - popd |
70 | | -
|
71 | 58 | - name: Run Spotify app - Melon Top 100 |
72 | 59 | shell: pwsh |
73 | 60 | run: | |
|
77 | 64 | $appsettings | ConvertTo-Json -Depth 100 | Out-File -FilePath ./samples/SpotifyPlaylist.ConsoleApp/appsettings.Development.json -Force |
78 | 65 |
|
79 | 66 | $date = (Get-Date).ToUniversalTime().AddHours(9).ToString("yyyyMMdd") |
80 | | - # $result = dotnet run --project ./samples/SpotifyPlaylist.ConsoleApp/ -- -t spotify -s ${{ secrets.SPOTIFY_MELON_TOP100_PLAYLIST_ID }} --json | ConvertFrom-Json |
81 | | - $result = dotnet run --project ./samples/SpotifyPlaylist.ConsoleApp/ -- -t spotify -s ${{ secrets.SPOTIFY_MELON_TOP100_PLAYLIST_ID }} --json |
| 67 | + # $result = dotnet run --project ./samples/SpotifyPlaylist.ConsoleApp/ -- -t melon -s "../../data/top100-$date.json" --json | ConvertFrom-Json |
| 68 | + $result = dotnet run --project ./samples/SpotifyPlaylist.ConsoleApp/ -- -t melon -s "../../data/top100-$date.json" --json |
82 | 69 |
|
83 | 70 | mkdir -p ./data |
84 | 71 | pushd ./data |
@@ -112,3 +99,14 @@ jobs: |
112 | 99 | commit_user_name: "GitHub Actions" |
113 | 100 | commit_user_email: "scraper+github-actions[bot]@users.noreply.github.com" |
114 | 101 | commit_author: "GitHub Actions <scraper+github-actions[bot]@users.noreply.github.com>" |
| 102 | + |
| 103 | + - name: Issue missing tracks |
| 104 | + shell: pwsh |
| 105 | + run: | |
| 106 | + $date = (Get-Date).ToUniversalTime().AddHours(9).ToString("yyyyMMdd") |
| 107 | + $collection = Get-Content "./data/spotify100-$date.json" | ConvertFrom-Json |
| 108 | +
|
| 109 | + if ($collection.missingTracks.Count -gt 0) { |
| 110 | + $tracks = $collection.missingTracks | ConvertTo-Json -Depth 100 |
| 111 | + gh issue create --title "Missing tracks in Spotify playlist" --body "The following tracks are missing in the Spotify playlist:`r`n```````r`n$tracks`r`n```````r`n" |
| 112 | + } |
0 commit comments