fix tag output

This commit is contained in:
Chris Titus 2024-11-01 15:15:35 -05:00
parent 6f21718963
commit 00d321d75e

View File

@ -26,7 +26,7 @@ jobs:
- name: Get tag name ( Workflow Run ) - name: Get tag name ( Workflow Run )
id: latest_tag id: latest_tag
uses: actions/github-script@v7 uses: actions/github-script@v7
if: ${{ github.event_name }} == 'workflow_run' if: github.event_name == 'workflow_run'
with: with:
script: | script: |
const releases = await github.rest.repos.listReleases({ const releases = await github.rest.repos.listReleases({
@ -34,11 +34,11 @@ jobs:
repo: context.repo.repo, repo: context.repo.repo,
per_page: 1 per_page: 1
}); });
return releases.data[0].tag_name; core.setOutput('result', releases.data[0].tag_name);
result-encoding: string result-encoding: string
- name: Set tag name ( Workflow Run ) - 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 run: echo "tag_name=${{ steps.latest_tag.outputs.result }}" >> $GITHUB_ENV
- name: Set tag name ( Workflow Dispatch ) - name: Set tag name ( Workflow Dispatch )