Skip to content

Commit

Permalink
fix: tag push in manual wf
Browse files Browse the repository at this point in the history
  • Loading branch information
teckmk committed Aug 8, 2024
1 parent 9a81239 commit 62b1e93
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/manual_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,22 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Git user
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
- name: Create and push tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git tag -a "${{ github.event.inputs.tag_name }}" -m "${{ github.event.inputs.tag_message }}"
git push origin "${{ github.event.inputs.tag_name }}"
const tag = '${{ inputs.tag_name }}';
const msg = '${{ inputs.tag_message }}';
await github.rest.git.createTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: tag,
sha: context.sha,
message: msg,
});
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${tag}`,
sha: context.sha,
});

0 comments on commit 62b1e93

Please sign in to comment.