Skip to main content

Posts

Showing posts from September, 2022

Creating tag from github web UI

 Problem: I have Github Actions that automatically create a new release when certain tag is pushed. The only way to create tag from github web interface is to create a new release. The Actions[1] I'm using however failed with error message:- Validation Failed: {"resource":"Release","code":"already_exists","field":"tag_name"} If the tag was created from release. We can create the tag using another Actions, there are a number of Actions that provide that. First I try using Github Script:- name: "create-tag" on: workflow_dispatch: inputs: tagname: description: 'Enter tag' required: true type: string jobs: create_tag: name: "Create tag" runs-on: "ubuntu-latest" steps: - name: Create tag ${{ inputs.tagname }} uses: actions/github-script@v5 with: script: | github.rest.git.createRef({ ...