From 6f6c2d26487e60351525b51b0cfc01cd27f4027a Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Fri, 5 Apr 2024 17:21:42 -0700 Subject: [PATCH] fix - deploy release with a commit hash --- .github/workflows/ghcr_deploy.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 5d2efd329..58cda02c3 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -242,18 +242,20 @@ jobs: with: github-token: "${{ secrets.GITHUB_TOKEN }}" script: | + const commitHash = "${{ github.event.inputs.commit_hash}}"; + console.log("Commit Hash:", commitHash); // Add this line for debugging try { const response = await github.rest.repos.createRelease({ draft: false, generate_release_notes: true, - target_commitish: ${{ github.event.inputs.commit_hash}}, + target_commitish: commitHash, name: process.env.RELEASE_TAG, owner: context.repo.owner, prerelease: false, repo: context.repo.repo, tag_name: process.env.RELEASE_TAG, }); - + core.exportVariable('RELEASE_ID', response.data.id); core.exportVariable('RELEASE_UPLOAD_URL', response.data.upload_url); } catch (error) {