Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Container Build
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: '0 1 * * *'

Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/validation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build validation

on:
pull_request:
types: [opened, synchronize, edited]
schedule:
- cron: '0 1 * * *'

permissions: write-all

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
VERSIONS: 3.11 3.12 3.10

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

- name: Registry Login
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Convert IMAGE_NAME to lowercase
id: lowercase
run: echo "IMAGE_NAME=$(echo ${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV

- name: Build
run: |
for VERSION in ${{ env.VERSIONS }}; do
echo "Building and pushing image with python version: $VERSION"
docker buildx build --no-cache --build-arg PYTHON_VERSION=$VERSION -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$VERSION" -f Dockerfile .
if [ $? -ne 0 ]; then
echo "Error building or pushing image with version: $VERSION"
exit 1
fi
done
Loading