Parcourir la source

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 il y a 2 ans
Parent
commit
175fd3c355
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      .github/workflows/build-with-firmwware.yml

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

@@ -191,7 +191,7 @@ jobs:
         env:
           GITHUB_TOKEN: ${{ secrets.FLIPPER_TOKEN }}
         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) ) {
             $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