-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates for streamlit, django and fastapi
- Loading branch information
1 parent
7e21b66
commit 69fff8a
Showing
5 changed files
with
65 additions
and
35 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 |
---|---|---|
|
@@ -6,26 +6,36 @@ permissions: | |
contents: read | ||
|
||
jobs: | ||
build-python-3-9-12: | ||
build-django-images: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Docker Login | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: python | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ vars.DOCKERHUB_NAMESPACE }}/python:3.9.12 | ||
- name: Discover and Build Images | ||
run: | | ||
cd django | ||
for dir in */; do | ||
# Extract version from the directory name | ||
version=${dir%/} | ||
echo "Building and pushing image for Python $version" | ||
# Build and push the Docker image for this version | ||
docker buildx build \ | ||
--platform linux/amd64,linux/arm64 \ | ||
--push \ | ||
--tag ${{ vars.DOCKERHUB_NAMESPACE }}/django:$version \ | ||
--file "$dir/Dockerfile" \ | ||
"$dir" | ||
done |
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
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 |
---|---|---|
|
@@ -12,11 +12,11 @@ jobs: | |
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Docker Login | ||
uses: docker/[email protected] | ||
with: | ||
|
@@ -26,7 +26,7 @@ jobs: | |
run: | | ||
cd python | ||
for dir in */; do | ||
# Extract Python version from the directory name | ||
# Extract version from the directory name | ||
version=${dir%/} | ||
echo "Building and pushing image for Python $version" | ||
|
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 |
---|---|---|
@@ -1,31 +1,41 @@ | ||
name: Build Python Images | ||
name: Build Streamlit Images | ||
|
||
on: workflow_dispatch | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build-python-3-9-12: | ||
build-streamlit-images: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
uses: docker/setup-qemu-action@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Docker Login | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: python | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ vars.DOCKERHUB_NAMESPACE }}/python:3.9.12 | ||
- name: Discover and Build Images | ||
run: | | ||
cd streamlit | ||
for dir in */; do | ||
# Extract version from the directory name | ||
version=${dir%/} | ||
echo "Building and pushing image for Python $version" | ||
# Build and push the Docker image for this version | ||
docker buildx build \ | ||
--platform linux/amd64,linux/arm64 \ | ||
--push \ | ||
--tag ${{ vars.DOCKERHUB_NAMESPACE }}/streamlit:$version \ | ||
--file "$dir/Dockerfile" \ | ||
"$dir" | ||
done |
File renamed without changes.