Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ninjascl/gha-notes
Example Github Action Workflow for adding git-notes to the latest commit.
https://github.com/ninjascl/gha-notes
git git-notes github github-actions workflow
Last synced: 30 days ago
JSON representation
Example Github Action Workflow for adding git-notes to the latest commit.
- Host: GitHub
- URL: https://github.com/ninjascl/gha-notes
- Owner: NinjasCL
- Created: 2020-09-20T20:09:51.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-09-21T00:35:07.000Z (over 4 years ago)
- Last Synced: 2024-11-20T00:40:11.731Z (3 months ago)
- Topics: git, git-notes, github, github-actions, workflow
- Language: Makefile
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
# 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
```yml
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/*"
```## Reference
- http://web.archive.org/web/20101130123509/https://progit.org/2010/08/25/notes.html
- https://github.blog/2010-08-25-git-notes-display/
- http://alblue.bandlem.com/2011/11/git-tip-of-week-git-notes.html
- https://git-scm.com/docs/git-notes
- https://gist.github.com/topheman/ec8cde7c54e24a785e52
++++
Made with ♥ by Ninjas.cl.
++++