Skip to content

Commit

Permalink
ci: check for dependencies on a schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
swiatekm committed Nov 13, 2023
1 parent b789654 commit 8c7cae6
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/check_dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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
[ -s issue_content.md ] && EMPTY=false || EMPTY=true
echo "issue-file=issue.md" >> "$GITHUB_OUTPUT"
echo "empty=$empty" >> "$GITHUB_OUTPUT"
- uses: JasonEtco/create-an-issue@v2
if: ${{ ! steps.dependency-report.outputs.empty }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: ${{ steps.dependency-report.outputs.issue-file }}
update_existing: true
search_existing: all
8 changes: 8 additions & 0 deletions ci/check_dependencies/issue_header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Update Chart dependencies
labels: dependencies
---

This issue was automatically generated by the `check_dependencies` tool located in [ci/check_dependencies][ci_check_dependencies].

[ci_check_dependencies]: https://github.com/SumoLogic/sumologic-kubernetes-collection/tree/main/ci/check_dependencies

0 comments on commit 8c7cae6

Please sign in to comment.