diff --git a/.github/workflows/hera.yaml b/.github/workflows/hera.yaml index 40370d5225..7eda40603e 100644 --- a/.github/workflows/hera.yaml +++ b/.github/workflows/hera.yaml @@ -13,23 +13,21 @@ jobs: outputs: output_labels: ${{ steps.get_labels_id.outputs.labels }} steps: - - name: Get the PR labels dynamically - id: get_labels_id - run: | - labels="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" >> $GITHUB_OUTPUT - echo "$labels" - shell: bash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OWNER: ${{ github.repository_owner }} - REPO_NAME: ${{ github.event.repository.name }} - PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} + - id: get_labels_id + run: | + labels="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" >> $GITHUB_OUTPUT + echo "$labels" + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OWNER: ${{ github.repository_owner }} + REPO_NAME: ${{ github.event.repository.name }} + PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} passed: - needs: - - get-labels - if: ${{ github.event.pull_request.merged == true }} runs-on: ubuntu-latest + needs: get-labels + if: ${{ github.event.pull_request.merged == true }} steps: - name: Passed