From 156ded4776e39bbbbc27f0aa9e9b4d5bd4dc0a5b Mon Sep 17 00:00:00 2001 From: ZHANG Yuntian <95260730+RadxaYuntian@users.noreply.github.com> Date: Tue, 9 Jul 2024 09:29:52 +0000 Subject: [PATCH] fix: action should use the same tag as the workflow --- .github/actions/build/action.yaml | 11 +++++++---- .../infra-product/.github/workflows/workflow.jsonnet | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/actions/build/action.yaml b/.github/actions/build/action.yaml index 9257d99..889169a 100644 --- a/.github/actions/build/action.yaml +++ b/.github/actions/build/action.yaml @@ -20,6 +20,9 @@ inputs: timestamp: required: false default: b${{ github.run_number }} + tag_name: + required: false + default: rsdk-b${{ github.run_number }} override-kernel: required: false override-firmware: @@ -96,12 +99,12 @@ runs: if: inputs.release-id != '' && inputs.github-token != '' uses: softprops/action-gh-release@v2 with: - tag_name: ${{ inputs.timestamp }} + tag_name: ${{ inputs.tag_name }} append_body: true body: | ## ${{ steps.prep.outputs.BUILD_TUPLE }} - [Download Image](https://github.com/radxa-build/${{ inputs.product }}/releases/download/${{ inputs.timestamp }}/${{ steps.prep.outputs.BUILD_TUPLE }}_${{ inputs.timestamp }}.output.img.xz) + [Download Image](https://github.com/radxa-build/${{ inputs.product }}/releases/download/${{ inputs.tag_name }}/${{ steps.prep.outputs.BUILD_TUPLE }}_${{ inputs.timestamp }}.output.img.xz) ### SHA-512 Checksum @@ -110,14 +113,14 @@ runs: if: inputs.release-id != '' && inputs.github-token != '' uses: softprops/action-gh-release@v2 with: - tag_name: ${{ inputs.timestamp }} + tag_name: ${{ inputs.tag_name }} append_body: true body_path: out/${{ steps.prep.outputs.BUILD_TUPLE }}/${{ steps.prep.outputs.BUILD_TUPLE }}_${{ inputs.timestamp }}.sha512sum - name: Append changelog footer if: inputs.release-id != '' && inputs.github-token != '' uses: softprops/action-gh-release@v2 with: - tag_name: ${{ inputs.timestamp }} + tag_name: ${{ inputs.tag_name }} append_body: true body: | ``` diff --git a/src/share/rsdk/infra-product/.github/workflows/workflow.jsonnet b/src/share/rsdk/infra-product/.github/workflows/workflow.jsonnet index e8c9be2..d62eb4f 100644 --- a/src/share/rsdk/infra-product/.github/workflows/workflow.jsonnet +++ b/src/share/rsdk/infra-product/.github/workflows/workflow.jsonnet @@ -114,6 +114,7 @@ function( { "test-repo": true, timestamp: "t${{ github.run_number }}", + tag_name: release_info(variant).tag_name, } else {},