Check dependencies #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check dependencies | |
on: | |
schedule: | |
- cron: "0 9 * * 1" | |
permissions: | |
contents: read | |
issues: write | |
jobs: | |
check-dependencies: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install -r ci/check_dependencies/requirements.txt | |
- 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 }} | |
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/[email protected] | |
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 }}"}}' |