-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
vlaszdunov
committed
May 31, 2024
0 parents
commit b0c2ea9
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |