-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (47 loc) · 1.66 KB
/
Copy pathexample.yml
File metadata and controls
55 lines (47 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Example workflow - Copy this to your repository's .github/workflows/ directory
# Rename to git-ai.yml or similar
name: Git AI
on:
pull_request:
types: [closed]
schedule:
- cron: "0 0 * * *" # Daily at midnight UTC
workflow_dispatch:
jobs:
pr-tracking:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.merge_commit_sha }}
- name: Run Git AI
uses: acunniffe/git-ai-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
pr-url: ${{ github.event.pull_request.html_url }}
merge-commit-sha: ${{ github.event.pull_request.merge_commit_sha }}
# Uncomment and configure for OTLP export:
# otel-endpoint: ${{ secrets.OTLP_ENDPOINT }}
# otel-headers: "Authorization=Bearer ${{ secrets.OTLP_TOKEN }}"
# otel-service-name: my-service
daily-export:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Git AI
uses: acunniffe/git-ai-action@v1
with:
default-branch: ${{ github.event.repository.default_branch }}
# Uncomment and configure for OTLP export:
# otel-endpoint: ${{ secrets.OTLP_ENDPOINT }}
# otel-headers: "Authorization=Bearer ${{ secrets.OTLP_TOKEN }}"
# otel-service-name: my-service