Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do I specify a specific commit when manually running git action?

How do I create a workflow that can only be started manually, while it will need to specify a specific commit with which it will work?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

You can manually run a workflow, provided it is configured to run on the workflow_dispatch event.
Add inputs to define your parameter

on:
  workflow_dispatch:
    inputs:
      myCommit:
        description: 'Commit SHA1'
        required: true
        default: 'undefined'
        type: string

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Do something
        run: your_command ${{ inputs.myCommit }}
  ...
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading