-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
22 lines (19 loc) · 971 Bytes
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
name: GitHub Issues Git Notes
description: Stores GitHub Issues in Git notes on every push to the repository.
runs:
using: composite
steps:
- name: Check out the Git repository workflow ref (detached HEAD)
uses: actions/checkout@v3
- name: Run the action script
shell: bash
run: |
# Configure GitHub Actions service account Git identity
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
# Store the GitHub Issues in a Git note associated to the main branch
git notes add main -f -m "$(curl --no-progress-meter '${{github.api_url}}/repos/${{github.repository}}/issues?state=all' -u :${{github.token}})"
# Integrate in recent changes to make sure we're on latest before the push
git pull --rebase
# Push the changes to the Git notes back to the GitHub repository
git push origin refs/notes/* -f