Skip to content

Commit

Permalink
Don't save the payload to an environment variable (#6280)
Browse files Browse the repository at this point in the history
  • Loading branch information
JimSuplizio authored Jun 2, 2023
1 parent ab4ae71 commit 2837a60
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/event-processor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,12 @@ jobs:

- name: Process Action Event
run: |
echo $GITHUB_PAYLOAD > payload.json
cat > payload.json << 'EOF'
${{ toJson(github.event) }}
EOF
github-event-processor ${{ github.event_name }} payload.json
shell: bash
env:
GITHUB_PAYLOAD: ${{ toJson(github.event) }}
# This is a temporary secret generated by github
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
30 changes: 18 additions & 12 deletions .github/workflows/scheduled-event-processor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,59 +64,65 @@ jobs:
- name: Close Stale Issues Scheduled Event
if: github.event.schedule == '0 1 * * *'
run: |
echo $GITHUB_PAYLOAD > payload.json
cat > payload.json << 'EOF'
${{ toJson(github.event) }}
EOF
github-event-processor ${{ github.event_name }} payload.json CloseStaleIssues
shell: bash
env:
GITHUB_PAYLOAD: ${{ toJson(github.event) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Identify Stale PullRequests Scheduled Event
if: github.event.schedule == '0 5 * * FRI'
run: |
echo $GITHUB_PAYLOAD > payload.json
cat > payload.json << 'EOF'
${{ toJson(github.event) }}
EOF
github-event-processor ${{ github.event_name }} payload.json IdentifyStalePullRequests
shell: bash
env:
GITHUB_PAYLOAD: ${{ toJson(github.event) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Close Stale PullRequests Scheduled Event
if: github.event.schedule == '30 2,8,14,20 * * *'
run: |
echo $GITHUB_PAYLOAD > payload.json
cat > payload.json << 'EOF'
${{ toJson(github.event) }}
EOF
github-event-processor ${{ github.event_name }} payload.json CloseStalePullRequests
shell: bash
env:
GITHUB_PAYLOAD: ${{ toJson(github.event) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Identify Stale Issues Scheduled Event
if: github.event.schedule == '30 3,9,15,21 * * *'
run: |
echo $GITHUB_PAYLOAD > payload.json
cat > payload.json << 'EOF'
${{ toJson(github.event) }}
EOF
github-event-processor ${{ github.event_name }} payload.json IdentifyStaleIssues
shell: bash
env:
GITHUB_PAYLOAD: ${{ toJson(github.event) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Close Addressed Issues Scheduled Event
if: github.event.schedule == '30 4,10,16,22 * * *'
run: |
echo $GITHUB_PAYLOAD > payload.json
cat > payload.json << 'EOF'
${{ toJson(github.event) }}
EOF
github-event-processor ${{ github.event_name }} payload.json CloseAddressedIssues
shell: bash
env:
GITHUB_PAYLOAD: ${{ toJson(github.event) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Lock Closed Issues Scheduled Event
if: github.event.schedule == '30 5,11,17,23 * * *'
run: |
echo $GITHUB_PAYLOAD > payload.json
cat > payload.json << 'EOF'
${{ toJson(github.event) }}
EOF
github-event-processor ${{ github.event_name }} payload.json LockClosedIssues
shell: bash
env:
GITHUB_PAYLOAD: ${{ toJson(github.event) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 2837a60

Please sign in to comment.