Skip to content

Commit

Permalink
Updates (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
gazwald authored Oct 31, 2023
1 parent d9e6660 commit 30525e2
Show file tree
Hide file tree
Showing 90 changed files with 2,792 additions and 2,749 deletions.
5 changes: 0 additions & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
**/__pycache__
*.pyc
**/cdk.out
deploymnet/
.venv/
.git/
.github/
Expand All @@ -10,12 +9,8 @@ deploymnet/
docker/
scripts/
test/
cdk.py
.coverage
.hadolint.yaml
.pylintrc
README.md
cdk.context.json
cdk.json
docker-compose.yaml
mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.12"]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
61 changes: 0 additions & 61 deletions .github/workflows/build.yaml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/build_container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: Build Container

on:
workflow_call:
inputs:
target:
required: true
type: string
dockerfile:
required: true
type: string

jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3

- name: "Hadolint: docker/${{ inputs.dockerfile }}"
uses: hadolint/[email protected]
with:
dockerfile: docker/${{ inputs.dockerfile }}

- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v3

- name: "Login to GitHub Container Registry"
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: "Set environment: ${{ inputs.target }}"
run: scripts/include/env-github ${{ inputs.target }}

- name: "Build and push"
uses: docker/build-push-action@v5
with:
context: .
file: docker/${{ inputs.dockerfile }}
target: ${{ inputs.target }}
platforms: linux/amd64
build-args: |
"CDK_TAG=${{ env.CDK_TAG }}"
"CDK_VERSION=${{ env.CDK_VERSION }}"
"CODE_DIR=${{ env.CODE_DIR }}"
"PIP_VERSION=${{ env.PIP_VERSION }}"
"POETRY_VERSION=${{ env.POETRY_VERSION }}"
push: true
tags: ${{ env.CONTAINER_IMAGE_REVISION }}
cache-from: type=gha
cache-to: type=gha,mode=max
20 changes: 0 additions & 20 deletions .github/workflows/cleanup_old_workflow_runs.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
python-version: ["3.12"]

steps:
- name: Checkout repository
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/lint_docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Lint Documentation

on:
workflow_call:

jobs:
lint_docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: "Linting: Docs"
run: scripts/ci/lint-docs
70 changes: 70 additions & 0 deletions .github/workflows/lint_python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
name: Lint Python

on:
workflow_call:

jobs:
black:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: "Linting: black"
run: scripts/ci/lint-black

isort:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: "Linting: isort"
run: scripts/ci/lint-isort

mypy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: "Linting: mypy"
run: scripts/ci/lint-mypy

pylint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: "Linting: pylint"
run: scripts/ci/lint-pylint
23 changes: 23 additions & 0 deletions .github/workflows/lint_yaml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Lint YAML

on:
workflow_call:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: "Linting: yaml"
run: scripts/ci/lint-yaml
if: always()
31 changes: 0 additions & 31 deletions .github/workflows/linting_docker.yaml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/linting_docs.yaml

This file was deleted.

Loading

0 comments on commit 30525e2

Please sign in to comment.