Преглед изворни кода

Fix: Suppress Github API call output in build workflow

This commit suppresses the standard output and standard error of the Github API call in the build workflow. This prevents potential noise in the workflow logs, keeping the focus on more relevant output for debugging tasks. This change is present in the 'Build with Firmware' Github action workflow for the 'Subbrute' application.
DerSkythe пре 2 година
родитељ
комит
175fd3c355
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      .github/workflows/build-with-firmwware.yml

+ 1 - 1
.github/workflows/build-with-firmwware.yml

@@ -191,7 +191,7 @@ jobs:
         env:
         env:
           GITHUB_TOKEN: ${{ secrets.FLIPPER_TOKEN }}
           GITHUB_TOKEN: ${{ secrets.FLIPPER_TOKEN }}
         run: |
         run: |
-          $url = (gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/${{ github.REPOSITORY }}/releases/tags/v${{ env.RELEASE_VERSION }}) | ConvertFrom-Json -AsHashtable
+          $url = (gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/${{ github.REPOSITORY }}/releases/tags/v${{ env.RELEASE_VERSION }} >$null 2>&1) | ConvertFrom-Json -AsHashtable -ErrorAction SilentlyContinue
           if ( [string]::IsNullOrWhitespace($url.name) ) {
           if ( [string]::IsNullOrWhitespace($url.name) ) {
             $sha = (git rev-parse --verify HEAD)
             $sha = (git rev-parse --verify HEAD)
             gh api --method POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/${{ github.REPOSITORY }}/releases -f tag_name='v${{ env.RELEASE_VERSION }}' -f target_commitish="$sha" -f name='v${{ env.RELEASE_VERSION }}' -F draft=true -F prerelease=false -F generate_release_notes=true
             gh api --method POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/${{ github.REPOSITORY }}/releases -f tag_name='v${{ env.RELEASE_VERSION }}' -f target_commitish="$sha" -f name='v${{ env.RELEASE_VERSION }}' -F draft=true -F prerelease=false -F generate_release_notes=true