-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (49 loc) · 1.95 KB
/
example.yml
File metadata and controls
55 lines (49 loc) · 1.95 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
#
# Version Pinning (recommended for security):
# Action version: use @v1.0.0 (see https://github.com/git-ai-project/action/releases)
# git-ai version: use git-ai-version input (see https://github.com/acunniffe/git-ai/releases)
name: git-ai
on:
pull_request:
types: [closed]
schedule:
- cron: "0 0 * * *" # Daily at midnight UTC
workflow_dispatch:
jobs:
pr-close:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Run Git AI PR Close
# You want @v1
# uses: git-ai-project/action/pr-close@v1
uses: git-ai-project/action/pr-close@main
continue-on-error: true
with:
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_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTLP_ENDPOINT }}
# OTEL_EXPORTER_OTLP_HEADERS: "Authorization=Bearer ${{ secrets.OTLP_TOKEN }}"
# OTEL_SERVICE_NAME: my-service
daily-metrics:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Run Git AI Daily Metrics
# You want @v1
# uses: git-ai-project/action/daily-metrics@v1
uses: git-ai-project/action/daily-metrics@main
with:
# git-ai-version: "v1.0.23" # Pin to a specific version for reproducibility
default-branch: ${{ github.event.repository.default_branch }}
# Uncomment and configure for OTLP export:
# OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTLP_ENDPOINT }}
# OTEL_EXPORTER_OTLP_HEADERS: "Authorization=Bearer ${{ secrets.OTLP_TOKEN }}"
# OTEL_SERVICE_NAME: my-service