Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
TGWolf committed Dec 21, 2023
1 parent 774aa50 commit 1070b77
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 76 deletions.
11 changes: 4 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
interval: "daily"
time: "04:00"
timezone: "UTC"
open-pull-requests-limit: 10
open-pull-requests-limit: 25
commit-message:
prefix: "chore:"
labels:
Expand All @@ -18,14 +17,12 @@ updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
interval: "daily"
time: "04:00"
timezone: "UTC"
open-pull-requests-limit: 10
open-pull-requests-limit: 25
commit-message:
prefix: "chore:"
labels:
- "dependabot: ecosystem : python"
- "dependabot: dependencies"

15 changes: 7 additions & 8 deletions .github/workflows/cicd-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
name: CICD Pipeline

#
# This is a repository specific local workflow - only the template is auto-generated
#

#
# Start of Template (part 1)
#
on:
push:
branches:
- '**'
paths-ignore:
- '**.md'
pull_request:
branches:
- '**'
paths-ignore:
- '**.md'
workflow_dispatch:

env:
Expand All @@ -22,6 +19,8 @@ env:
jobs:
bandit:
name: Bandit
uses: actionstoolbox/reusable-workflows/reusable-workflows/bandit.yml@main

runs-on: ubuntu-latest
steps:
- name: Checkout the repository
Expand Down Expand Up @@ -92,7 +91,7 @@ jobs:
run: bash <(curl -s https://github.com/raw/CICDToolbox/pylint/master/pipeline.sh)

slack-workflow-status:
if: always()
if: always() && ${{ github.actor != 'dependabot[bot]' }}
name: Slack Post Workflow Notification
needs:
- bandit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
uses: github/codeql-action/analyze@421a1b344fb0def373a0794a4051f19f207461ec # v2.2.1

slack-workflow-status:
if: always()
if: always() && ${{ github.actor != 'dependabot[bot]' }}
name: Slack Post Workflow Notification
needs:
- analyze
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delete-old-runs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

slack-workflow-status:
if: always()
if: success() || failure()
name: Slack Post Workflow Notification
needs:
- delete-old-workflows
Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/git-guardian.yml

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
issues: write
pull-requests: write
steps:
- name: Handle greetings
uses: actions/first-interaction@1d8459ca65b335265f1285568221e229d45a995e # v1.1.1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Thank you for raising your first issue - all contributions to this project are welcome!"
pr-message: "Thank you for raising your first pull request - all contributions to this project are welcome!"
- name: Handle greetings
uses: actions/first-interaction@1d8459ca65b335265f1285568221e229d45a995e # v1.1.1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Thank you for raising your first issue - all contributions to this project are welcome!"
pr-message: "Thank you for raising your first pull request - all contributions to this project are welcome!"

slack-workflow-status:
if: always()
if: always() && ${{ github.actor != 'dependabot[bot]' }}
name: Slack Post Workflow Notification
needs:
- greeting
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repo-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
run: bash <(curl -s https://github.com/raw/CICDToolbox/yaml-lint/master/pipeline.sh)

slack-workflow-status:
if: always()
if: always() && ${{ github.actor != 'dependabot[bot]' }}
name: Slack Post Workflow Notification
needs:
- actionlint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@21991cec25093947ff3f62e4c223df0260c39944 # v2.1.2

slack-workflow-status:
if: always()
if: always() && ${{ github.actor != 'dependabot[bot]' }}
name: Slack Post Workflow Notification
needs:
- harden_security
Expand Down
8 changes: 1 addition & 7 deletions entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def get_minimum_version_from_oel(language: str) -> str:
versions_url: str = URLS[language]["eol_url"]
min_version: str = MAX_VERSION

future: datetime.date = datetime.date.today() + datetime.timedelta(3650)
for release in requests.get(versions_url, timeout=REQUESTS_TIMEOUT).json():
try:
semver.Version(release['cycle'])
Expand All @@ -120,13 +119,8 @@ def get_minimum_version_from_oel(language: str) -> str:

if release['eol'] is True:
continue
if release['eol'] is False:
if semver.parse(release['cycle']) < min_version:
min_version: str = semver.parse(release['cycle'])
continue

if (datetime.date.today() < datetime.date.fromisoformat(release['eol']) and datetime.date.fromisoformat(release['eol']) < future):
future = datetime.date.fromisoformat(release['eol'])
if (datetime.date.today() < datetime.date.fromisoformat(release['eol'])):
min_version = semver.parse(release['cycle'])

return min_version
Expand Down

0 comments on commit 1070b77

Please sign in to comment.