Skip to content

Get issues

Get issues #20

Workflow file for this run

name: Push
on:
push:
jobs:
failing-job:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Failing job
run: exit 1
create-issue:
runs-on: ubuntu-latest
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') }}
needs: [ failing-job ]
steps:
- name: Check whether the issue already exists
id: check-issue
continue-on-error: true
run: |
if curl -L -H "Authorization: Bearer ${{ github.token }}" https://api.github.com/repos/$GITHUB_REPOSITORY/issues | grep "CI run failed"; then
echo ISSUE_EXISTS="True" >> $GITHUB_OUTPUT
else
echo ISSUE_EXISTS="False" >> $GITHUB_OUTPUT
fi
- name: Create issue
if: ${{ steps.check-issue.outputs.ISSUE_EXISTS == "True" }}

Check failure on line 30 in .github/workflows/on_push.yaml

View workflow run for this annotation

GitHub Actions / Push

Invalid workflow file

The workflow is not valid. .github/workflows/on_push.yaml (Line: 30, Col: 13): Unexpected symbol: '"True"'. Located at position 43 within expression: steps.check-issue.outputs.ISSUE_EXISTS == "True"
uses: dacbd/create-issue-action@main
with:
token: ${{ github.token }}
title: CI run failed
body: my new issue