From 60834582cd9c32caf2e27cd8fcd478feec9646f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Tue, 14 Nov 2023 16:27:03 +0100 Subject: [PATCH] ci: create a JIRA issue for dependency updates --- .github/workflows/check_dependencies.yaml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check_dependencies.yaml b/.github/workflows/check_dependencies.yaml index 0114983ca7..08ed241ca0 100644 --- a/.github/workflows/check_dependencies.yaml +++ b/.github/workflows/check_dependencies.yaml @@ -27,14 +27,29 @@ jobs: cp ci/check_dependencies/issue_header.md issue.md make check-dependencies >issue_content.md cat issue_content.md >> issue.md - [ -s issue_content.md ] && EMPTY=false || EMPTY=true echo "issue-file=issue.md" >> "$GITHUB_OUTPUT" - echo "empty=$empty" >> "$GITHUB_OUTPUT" + echo "empty=$(test -s issue_content.md && echo 'false' || echo 'true')" >> "$GITHUB_OUTPUT" - uses: JasonEtco/create-an-issue@v2 - if: ${{ ! steps.dependency-report.outputs.empty }} + name: Create Github issue + id: create-issue + if: ${{ steps.dependency-report.outputs.empty == 'false' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: filename: ${{ steps.dependency-report.outputs.issue-file }} update_existing: true search_existing: all + - name: Create Jira issue + id: create-jira-issue + if: ${{ steps.dependency-report.outputs.empty == 'false' }} + uses: tomhjp/gh-action-jira-create@v0.2.1 + env: + JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} + JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} + JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} + with: + project: OSC + issuetype: "Task" + summary: "Update Helm Chart dependencies" + description: "See ${{ steps.create-issue.outputs.url }}" + extraFields: '{"labels": ["opensource_gardener"], "priority": {"name": "Highest"}, "assignee": {"id": "${{ secrets.JIRA_USER_ID }}"}}' \ No newline at end of file