Skip to content

A pull request (PR) based Github Action workflow to update Tags whenever a PR is merged

Actions
An action to say hello
v0.0.1
Latest
Star (0)

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

A pull request (PR) based Github Action workflow to update Tags whenever a PR is merged is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

An action to say hello
v0.0.1
Latest

A pull request (PR) based Github Action workflow to update Tags whenever a PR is merged is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.