From 60f8e23a6def67e41856b4c59995b375753b804b Mon Sep 17 00:00:00 2001 From: Vojtech Horky Date: Fri, 9 Aug 2024 11:42:35 +0200 Subject: [PATCH] CI: check Dockerfiles via Dependabot Based on original pull request #1 by @reneleonhardt. Thanks! --- .github/dependabot.yml | 140 +++++++++++++++++++++++++++++++++++++++++ update.py | 21 +++++++ 2 files changed, 161 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8477af9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,140 @@ + +version: 2 + +# Multiple directories not working properly +# See https://github.com/dependabot/dependabot-core/issues/2178 + +updates: + + + - package-ecosystem: docker + directory: /buildenv-openjdk8 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk8-with-ant-gcc + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk9 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk10 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk11 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk11-with-ant-gcc + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk12 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk13 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk14 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk15 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk16 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk17 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk18 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk19 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk20 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk21 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk22 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openjdk23-ea + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openj9-openjdk8 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openj9-openjdk11 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openj9-openjdk17 + schedule: + interval: weekly + + + - package-ecosystem: docker + directory: /buildenv-openj9-openjdk21 + schedule: + interval: weekly + diff --git a/update.py b/update.py index f997ea0..3714c61 100755 --- a/update.py +++ b/update.py @@ -241,6 +241,22 @@ ''' +GITHUB_DEPENDABOT_FILENAME = '.github/dependabot.yml' +GITHUB_DEPENDABOT_HEADER = ''' +version: 2 + +# Multiple directories not working properly +# See https://github.com/dependabot/dependabot-core/issues/2178 + +updates: +''' +GITHUB_DEPENDABOT_TEMPLATE = ''' + - package-ecosystem: docker + directory: /buildenv-{name} + schedule: + interval: weekly +''' + def replace_shell_pseudo_variables(where, variables): if not variables: @@ -312,5 +328,10 @@ def main(): for version_config in VERSIONS: print(GITHUB_WORKFLOW_TEMPLATE.format(**version_config), file=f) + with open(GITHUB_DEPENDABOT_FILENAME, 'w') as f: + print(GITHUB_DEPENDABOT_HEADER, file=f) + for version_config in VERSIONS: + print(GITHUB_DEPENDABOT_TEMPLATE.format(**version_config), file=f) + if __name__ == '__main__': main()