Skip to content

create_tag

create_tag #6

Workflow file for this run

name: 'create_tag'
on:
workflow_dispatch:
inputs:
tag:
description: 'The name of the tag to be created.'
type: 'string'
required: true
branch:
description: 'The branch to create tag from.'
type: 'string'
required: false
default: 'main'
jobs:
create-tag:
runs-on: 'ubuntu-latest'
environment: release
permissions:
contents: 'write'
steps:
- name: 'create tag'
uses: 'actions/github-script@98814c53be79b1d30f795b907e553d8679345975' # ratchet:actions/github-script@v6
with:
github-token: '${{ secrets.PAT }}'
retries: '3'
script: |+
await github.rest.git.createTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: '${{ inputs.tag }}',
object: 'dbad86190ff2f21a180e135e8b00ac2ddd7bae83',
type: 'commit',
message: 'creating tags in wf'
});
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ inputs.tag}}',
sha: 'dbad86190ff2f21a180e135e8b00ac2ddd7bae83',
})