Skip to content

A github action to to automatically create tags linked to Pull Requests based upon the pull request title

License

Notifications You must be signed in to change notification settings

developerdenesh/pr_versioning

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

PR_VERSIONING

A github action to to automatically create tags linked to Pull Requests based upon the pull request title

Example:

The action can be run as follows:

name: Versioning

on:
    pull_request:
      types:
        - closed
  
jobs:
    create_tag_on_approved_pr:
        if: github.event.pull_request.merged == true
        runs-on: ubuntu-latest
        steps:
          - name: Print PR title
            run: echo "#${{ github.event.number }} ${{ github.event.pull_request.title }} has been merged"
            
          - name: Clone Repository
            uses: actions/checkout@v3
            with:
                ref: main
                fetch-depth: '0'
          - name: Creating a tag
            uses: developerdenesh/pr_versioning@main
            with:
                workspace: ${{ github.workspace }}
                title: ${{ github.event.pull_request.title }}

Common Errors

  1. If the following error is seen - fatal: unable to access 'https://github.com/someuser/somerepo': The requested URL returned error: 403. Make sure the settings to allow actions to make changes to a repository is set appropriately as seen here: Error Image One

Resources:

The concept has arisen from Conventional Commits. This will work best when used together with semantic-pull-request

About

A github action to to automatically create tags linked to Pull Requests based upon the pull request title

Resources

License

Stars

Watchers

Forks

Packages

No packages published