-
Notifications
You must be signed in to change notification settings - Fork 184
59 lines (56 loc) · 2.05 KB
/
check_dependencies.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Check dependencies
on:
schedule:
- cron: "0 9 * * 1"
workflow_dispatch:
permissions:
contents: read
issues: write
jobs:
check-dependencies:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install -r ci/check_dependencies/requirements.txt
- name: Get issue title
run: |
echo "ISSUE_TITLE=Update Chart dependencies $(date +%Y-%m-%d) " >> "$GITHUB_ENV"
- name: Generate dependency report
id: dependency-report
run: |
cp ci/check_dependencies/issue_header.md issue.md
make check-dependencies >issue_content.md
cat issue_content.md >> issue.md
echo "issue-file=issue.md" >> "$GITHUB_OUTPUT"
echo "empty=$(test -s issue_content.md && echo 'false' || echo 'true')" >> "$GITHUB_OUTPUT"
- uses: JasonEtco/create-an-issue@v2
name: Create Github issue
id: create-issue
if: ${{ steps.dependency-report.outputs.empty == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_TITLE: ${{ env.ISSUE_TITLE }}
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: ${{ env.ISSUE_TITLE }}
description: "See ${{ steps.create-issue.outputs.url }}"
extraFields:
'{"labels": ["opensource_gardener"], "priority": {"name": "Highest"}, "assignee": {"id": "${{ secrets.JIRA_USER_ID }}"}}'