Skip to content

Commit

Permalink
point tag to right place
Browse files Browse the repository at this point in the history
  • Loading branch information
nhanphan committed Sep 14, 2024
1 parent 8a78a4a commit 5cc1092
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/deploy-program.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,21 @@ jobs:
git reset --soft HEAD~1
git stash pop
- name: Create tag
- name: Create env tag
uses: actions/github-script@v5
with:
script: |
const refData = await github.rest.git.getRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/${{ inputs.git_ref }}'
});
if (refData.status !== 200) {
throw new Error('Failed to fetch existing tag');
}
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ needs.check_tag.outputs.program }}-${{ inputs.cluster }}',
sha: '${{ github.sha }}'
sha: refData.data.object.sha
});

0 comments on commit 5cc1092

Please sign in to comment.