Sync .github/workflows directory with azure-sdk-tools for PR 9134 (#2939)
* Use $GITHUB_EVENT_PATH variable instead of inline file writing * Archive github event data --------- Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
Родитель
0ec72db5db
Коммит
23af596dfa
|
@ -87,10 +87,7 @@ jobs:
|
||||||
|
|
||||||
- name: Process Action Event
|
- name: Process Action Event
|
||||||
run: |
|
run: |
|
||||||
cat > payload.json << 'EOF'
|
github-event-processor ${{ github.event_name }} ${{ github.event_path }}
|
||||||
${{ toJson(github.event) }}
|
|
||||||
EOF
|
|
||||||
github-event-processor ${{ github.event_name }} payload.json
|
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
# This is a temporary secret generated by github
|
# This is a temporary secret generated by github
|
||||||
|
@ -98,6 +95,13 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
LABEL_SERVICE_API_KEY: ${{ env.LABEL_SERVICE_API_KEY }}
|
LABEL_SERVICE_API_KEY: ${{ env.LABEL_SERVICE_API_KEY }}
|
||||||
|
|
||||||
|
- name: Archive github event data
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: event
|
||||||
|
path: ${{ github.event_path }}
|
||||||
|
|
||||||
event-handler:
|
event-handler:
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
|
@ -143,12 +147,16 @@ jobs:
|
||||||
|
|
||||||
- name: Process Action Event
|
- name: Process Action Event
|
||||||
run: |
|
run: |
|
||||||
cat > payload.json << 'EOF'
|
github-event-processor ${{ github.event_name }} ${{ github.event_path }}
|
||||||
${{ toJson(github.event) }}
|
|
||||||
EOF
|
|
||||||
github-event-processor ${{ github.event_name }} payload.json
|
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
# This is a temporary secret generated by github
|
# This is a temporary secret generated by github
|
||||||
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
|
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Archive github event data
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: event
|
||||||
|
path: ${{ github.event_path }}
|
||||||
|
|
|
@ -69,10 +69,7 @@ jobs:
|
||||||
- name: Close Stale Issues Scheduled Event
|
- name: Close Stale Issues Scheduled Event
|
||||||
if: github.event.schedule == '0 1 * * *'
|
if: github.event.schedule == '0 1 * * *'
|
||||||
run: |
|
run: |
|
||||||
cat > payload.json << 'EOF'
|
github-event-processor ${{ github.event_name }} ${{ github.event_path }} CloseStaleIssues
|
||||||
${{ toJson(github.event) }}
|
|
||||||
EOF
|
|
||||||
github-event-processor ${{ github.event_name }} payload.json CloseStaleIssues
|
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -80,10 +77,7 @@ jobs:
|
||||||
- name: Identify Stale PullRequests Scheduled Event
|
- name: Identify Stale PullRequests Scheduled Event
|
||||||
if: github.event.schedule == '0 5 * * FRI'
|
if: github.event.schedule == '0 5 * * FRI'
|
||||||
run: |
|
run: |
|
||||||
cat > payload.json << 'EOF'
|
github-event-processor ${{ github.event_name }} ${{ github.event_path }} IdentifyStalePullRequests
|
||||||
${{ toJson(github.event) }}
|
|
||||||
EOF
|
|
||||||
github-event-processor ${{ github.event_name }} payload.json IdentifyStalePullRequests
|
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -91,10 +85,7 @@ jobs:
|
||||||
- name: Close Stale PullRequests Scheduled Event
|
- name: Close Stale PullRequests Scheduled Event
|
||||||
if: github.event.schedule == '30 2,8,14,20 * * *'
|
if: github.event.schedule == '30 2,8,14,20 * * *'
|
||||||
run: |
|
run: |
|
||||||
cat > payload.json << 'EOF'
|
github-event-processor ${{ github.event_name }} ${{ github.event_path }} CloseStalePullRequests
|
||||||
${{ toJson(github.event) }}
|
|
||||||
EOF
|
|
||||||
github-event-processor ${{ github.event_name }} payload.json CloseStalePullRequests
|
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -102,10 +93,7 @@ jobs:
|
||||||
- name: Identify Stale Issues Scheduled Event
|
- name: Identify Stale Issues Scheduled Event
|
||||||
if: github.event.schedule == '30 3,9,15,21 * * *'
|
if: github.event.schedule == '30 3,9,15,21 * * *'
|
||||||
run: |
|
run: |
|
||||||
cat > payload.json << 'EOF'
|
github-event-processor ${{ github.event_name }} ${{ github.event_path }} IdentifyStaleIssues
|
||||||
${{ toJson(github.event) }}
|
|
||||||
EOF
|
|
||||||
github-event-processor ${{ github.event_name }} payload.json IdentifyStaleIssues
|
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -113,10 +101,7 @@ jobs:
|
||||||
- name: Close Addressed Issues Scheduled Event
|
- name: Close Addressed Issues Scheduled Event
|
||||||
if: github.event.schedule == '30 4,10,16,22 * * *'
|
if: github.event.schedule == '30 4,10,16,22 * * *'
|
||||||
run: |
|
run: |
|
||||||
cat > payload.json << 'EOF'
|
github-event-processor ${{ github.event_name }} ${{ github.event_path }}
|
||||||
${{ toJson(github.event) }}
|
|
||||||
EOF
|
|
||||||
github-event-processor ${{ github.event_name }} payload.json CloseAddressedIssues
|
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -124,10 +109,7 @@ jobs:
|
||||||
- name: Lock Closed Issues Scheduled Event
|
- name: Lock Closed Issues Scheduled Event
|
||||||
if: github.event.schedule == '30 5,11,17,23 * * *'
|
if: github.event.schedule == '30 5,11,17,23 * * *'
|
||||||
run: |
|
run: |
|
||||||
cat > payload.json << 'EOF'
|
github-event-processor ${{ github.event_name }} ${{ github.event_path }} LockClosedIssues
|
||||||
${{ toJson(github.event) }}
|
|
||||||
EOF
|
|
||||||
github-event-processor ${{ github.event_name }} payload.json LockClosedIssues
|
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -135,10 +117,14 @@ jobs:
|
||||||
- name: Enforce Max Life of Issues Scheduled Event
|
- name: Enforce Max Life of Issues Scheduled Event
|
||||||
if: github.event.schedule == '0 18 * * 1,3,5'
|
if: github.event.schedule == '0 18 * * 1,3,5'
|
||||||
run: |
|
run: |
|
||||||
cat > payload.json << 'EOF'
|
github-event-processor ${{ github.event_name }} ${{ github.event_path }} EnforceMaxLifeOfIssues
|
||||||
${{ toJson(github.event) }}
|
|
||||||
EOF
|
|
||||||
github-event-processor ${{ github.event_name }} payload.json EnforceMaxLifeOfIssues
|
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Archive github event data
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: event
|
||||||
|
path: ${{ github.event_path }}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче