Skip to content

Post CI

Post CI #12570

Workflow file for this run

on:
workflow_run:
workflows:
- Continuous Integration
types:
- completed
name: Post CI
# This is adapted from https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run (2022-07-17)
jobs:
on-failure:
runs-on: ubuntu-latest
steps:
- name: Fetch PR Data
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615
with:
name: pr_number
workflow: ci.yml
run_id: ${{ github.event.workflow_run.id }}
- name: Save PR Data
id: save-pr-data
run: |
echo "pr_number=$(cat pr_number)" >> $GITHUB_OUTPUT
echo "pr_sha=$(cat pr_sha)" >> $GITHUB_OUTPUT
echo "merge_sha=$(cat merge_sha)" >> $GITHUB_OUTPUT
- name: Add Comment
uses: marocchino/sticky-pull-request-comment@39c5b5dc7717447d0cba270cd115037d32d28443
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
with:
number: ${{ steps.save-pr-data.outputs.pr_number }}
recreate: true
message: |
The commit ${{ steps.save-pr-data.outputs.pr_sha }} (as a parent of ${{ steps.save-pr-data.outputs.merge_sha }}) contains errors.
Please inspect the [Run Summary](https://github.com/ethereum/EIPs/pull/${{ steps.save-pr-data.outputs.pr_number }}/files) for details.
- name: Add Waiting Label
uses: actions-ecosystem/action-add-labels@288072f1a3b596f4350fe135bcfe381a23abadef
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
with:
labels: w-ci
number: ${{ steps.save-pr-data.outputs.pr_number }}
repo: ${{ github.repository }}
github_token: ${{ github.token }}
- name: Remove Waiting Label
uses: actions-ecosystem/action-remove-labels@d05162525702062b6bdef750ed8594fc024b3ed7
if: ${{ github.event.workflow_run.conclusion != 'failure' }}
with:
labels: w-ci
number: ${{ steps.save-pr-data.outputs.pr_number }}
repo: ${{ github.repository }}
github_token: ${{ github.token }}