Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vlaszdunov committed May 31, 2024
0 parents commit b0c2ea9
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
43 changes: 43 additions & 0 deletions .github/workflows/Publisher.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: build and push
run-name: Build and push Python images to GHCR

on:
push:
schedule:
- cron: 0 0 * * *
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-publish:
permissions:
contents: read
packages: write
id-token: write

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

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

- name: Build Python Images
run: |
docker build . --target III.X --tag ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:3.10
docker build . --target III.XI --tag ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:3.11
docker build . --target III.XII --tag ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:3.12
docker build . --target latest --tag ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
- name: Publish Python Images
run: |
docker push ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:3.10
docker push ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:3.11
docker push ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:3.12
docker push ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM python:3.10 as III.X
FROM python:3.11 as III.XI
FROM python:3.12 as III.XII
FROM python:latest as latest
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Python Docker Images

Avaliable Versions
| Python 3.10 | Python 3.11 | Python 3.12 | Python latest |
|-------------|-------------|-------------|---------------|

### Using as base image
If you want to use this images as Base image in your Dockerfile\
you need to paste this instruction into Dockerfile:
```Dockerfile
FROM ghcr.io/vlaszdunov/python:replace-with-specific-version
```

0 comments on commit b0c2ea9

Please sign in to comment.