Skip to content

Example Github Action Workflow for adding git-notes to the latest commit.

Notifications You must be signed in to change notification settings

NinjasCL/gha-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Github Action Notes

This is an example of using GitHub actions to use the git-notes feature.

Git notes enables you adding data to a commit without changing it’s SHA. They’re available since Git 1.6.6. They’re cool for appending notes from automated systems (like ticket or build systems) but not really for having interactive conversations with other developers.

Displaying Git notes on GitHub is no longer supported. But you can store them anyway if you need to append additional info to the commits.

Example Workflow

name: Example Git notes Workflow
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: |
          git config user.name "${GITHUB_ACTOR}"
          git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
          git fetch origin "refs/notes/*:refs/notes/*"
          git notes append -m "Testing notes with github actions. Ref: ${GITHUB_REF} - ${GITHUB_SHA}"
          git push origin "refs/notes/*"

About

Example Github Action Workflow for adding git-notes to the latest commit.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published