From 00d321d75ea8f3502ebdc3a01c3fffc823993653 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Fri, 1 Nov 2024 15:15:35 -0500 Subject: [PATCH] fix tag output --- .github/workflows/preview.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index bf242600..4967eeef 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -26,7 +26,7 @@ jobs: - name: Get tag name ( Workflow Run ) id: latest_tag uses: actions/github-script@v7 - if: ${{ github.event_name }} == 'workflow_run' + if: github.event_name == 'workflow_run' with: script: | const releases = await github.rest.repos.listReleases({ @@ -34,11 +34,11 @@ jobs: repo: context.repo.repo, per_page: 1 }); - return releases.data[0].tag_name; + core.setOutput('result', releases.data[0].tag_name); result-encoding: string - name: Set tag name ( Workflow Run ) - if: ${{ github.event_name }} == 'workflow_run' + if: github.event_name == 'workflow_run' run: echo "tag_name=${{ steps.latest_tag.outputs.result }}" >> $GITHUB_ENV - name: Set tag name ( Workflow Dispatch )