Skip to content

Commit

Permalink
refactor: reformatted python and applied yamllint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
clay-lake committed Oct 14, 2024
1 parent dd3fe16 commit a2978b2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
1 change: 0 additions & 1 deletion .github/actions/checkout/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@ runs:
then
git submodule update ${{ inputs.submodules == 'recursive' && '--recursive' || '' }}
fi
16 changes: 8 additions & 8 deletions .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ jobs:
access-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Validate access to triggered image
uses: ./.github/actions/validate-actor
if: ${{ github.repository == 'canonical/oci-factory' && !github.event.pull_request.head.repo.fork }}
with:
admin-only: true
image-path: ${{ inputs.oci-image-path }}
github-token: ${{ secrets.ROCKSBOT_TOKEN }}
- uses: actions/checkout@v4
- name: Validate access to triggered image
uses: ./.github/actions/validate-actor
if: ${{ github.repository == 'canonical/oci-factory' && !github.event.pull_request.head.repo.fork }}
with:
admin-only: true
image-path: ${{ inputs.oci-image-path }}
github-token: ${{ secrets.ROCKSBOT_TOKEN }}

fetch-oci-image:
runs-on: ubuntu-22.04
Expand Down
1 change: 1 addition & 0 deletions src/docs/schema/triggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
this module is the pydantic version
of the documentation.yaml schema.
"""

from typing import Optional
from pydantic import BaseModel, Extra, constr, conlist

Expand Down
7 changes: 4 additions & 3 deletions src/image/prepare_single_image_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ def validate_image_trigger(data: dict) -> None:

# set an output as a marker for later knowing if we need to release
if "release" in builds[img_number]:
min_eol = datetime.strptime(min(
v["end-of-life"] for v in builds[img_number]["release"].values()
), "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc)
min_eol = datetime.strptime(
min(v["end-of-life"] for v in builds[img_number]["release"].values()),
"%Y-%m-%dT%H:%M:%SZ",
).replace(tzinfo=timezone.utc)
if min_eol < datetime.now(timezone.utc):
print("Track skipped because it reached its end of life")
del builds[img_number]
Expand Down

0 comments on commit a2978b2

Please sign in to comment.