Skip to content

Commit 692203f

Browse files
committed
Archive github event data
1 parent 7149d81 commit 692203f

2 files changed

Lines changed: 30 additions & 9 deletions

File tree

.github/workflows/event-processor.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,21 @@ jobs:
8787

8888
- name: Process Action Event
8989
run: |
90-
github-event-processor ${{ github.event_name }} $GITHUB_EVENT_PATH
90+
github-event-processor ${{ github.event_name }} ${{ github.event_path }}
9191
shell: bash
9292
env:
9393
# This is a temporary secret generated by github
9494
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
9595
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9696
LABEL_SERVICE_API_KEY: ${{ env.LABEL_SERVICE_API_KEY }}
9797

98+
- name: Archive github event data
99+
uses: actions/upload-artifact@v4
100+
if: always()
101+
with:
102+
name: event
103+
path: ${{ github.event_path }}
104+
98105
event-handler:
99106
permissions:
100107
issues: write
@@ -140,9 +147,16 @@ jobs:
140147

141148
- name: Process Action Event
142149
run: |
143-
github-event-processor ${{ github.event_name }} $GITHUB_EVENT_PATH
150+
github-event-processor ${{ github.event_name }} ${{ github.event_path }}
144151
shell: bash
145152
env:
146153
# This is a temporary secret generated by github
147154
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
148155
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
156+
157+
- name: Archive github event data
158+
uses: actions/upload-artifact@v4
159+
if: always()
160+
with:
161+
name: event
162+
path: ${{ github.event_path }}

.github/workflows/scheduled-event-processor.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,55 +69,62 @@ jobs:
6969
- name: Close Stale Issues Scheduled Event
7070
if: github.event.schedule == '0 1 * * *'
7171
run: |
72-
github-event-processor ${{ github.event_name }} $GITHUB_EVENT_PATH CloseStaleIssues
72+
github-event-processor ${{ github.event_name }} ${{ github.event_path }} CloseStaleIssues
7373
shell: bash
7474
env:
7575
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7676

7777
- name: Identify Stale PullRequests Scheduled Event
7878
if: github.event.schedule == '0 5 * * FRI'
7979
run: |
80-
github-event-processor ${{ github.event_name }} $GITHUB_EVENT_PATH IdentifyStalePullRequests
80+
github-event-processor ${{ github.event_name }} ${{ github.event_path }} IdentifyStalePullRequests
8181
shell: bash
8282
env:
8383
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8484

8585
- name: Close Stale PullRequests Scheduled Event
8686
if: github.event.schedule == '30 2,8,14,20 * * *'
8787
run: |
88-
github-event-processor ${{ github.event_name }} $GITHUB_EVENT_PATH CloseStalePullRequests
88+
github-event-processor ${{ github.event_name }} ${{ github.event_path }} CloseStalePullRequests
8989
shell: bash
9090
env:
9191
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9292

9393
- name: Identify Stale Issues Scheduled Event
9494
if: github.event.schedule == '30 3,9,15,21 * * *'
9595
run: |
96-
github-event-processor ${{ github.event_name }} $GITHUB_EVENT_PATH IdentifyStaleIssues
96+
github-event-processor ${{ github.event_name }} ${{ github.event_path }} IdentifyStaleIssues
9797
shell: bash
9898
env:
9999
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100100

101101
- name: Close Addressed Issues Scheduled Event
102102
if: github.event.schedule == '30 4,10,16,22 * * *'
103103
run: |
104-
github-event-processor ${{ github.event_name }} $GITHUB_EVENT_PATH
104+
github-event-processor ${{ github.event_name }} ${{ github.event_path }}
105105
shell: bash
106106
env:
107107
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108108

109109
- name: Lock Closed Issues Scheduled Event
110110
if: github.event.schedule == '30 5,11,17,23 * * *'
111111
run: |
112-
github-event-processor ${{ github.event_name }} $GITHUB_EVENT_PATH LockClosedIssues
112+
github-event-processor ${{ github.event_name }} ${{ github.event_path }} LockClosedIssues
113113
shell: bash
114114
env:
115115
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
116116

117117
- name: Enforce Max Life of Issues Scheduled Event
118118
if: github.event.schedule == '0 18 * * 1,3,5'
119119
run: |
120-
github-event-processor ${{ github.event_name }} $GITHUB_EVENT_PATH EnforceMaxLifeOfIssues
120+
github-event-processor ${{ github.event_name }} ${{ github.event_path }} EnforceMaxLifeOfIssues
121121
shell: bash
122122
env:
123123
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124+
125+
- name: Archive github event data
126+
uses: actions/upload-artifact@v4
127+
if: always()
128+
with:
129+
name: event
130+
path: ${{ github.event_path }}

0 commit comments

Comments
 (0)