Skip to content

Check dependencies

Check dependencies #67

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 }}"}}'