Skip to content

Commit

Permalink
👷 Update CI for deploy to use latest in matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Mar 17, 2024
1 parent 47f2cd0 commit fc0fbfe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
strategy:
matrix:
image:
- name: latest
python_version: "3.11"
- name: python3.11
python_version: "3.11"
- name: python3.10
Expand Down Expand Up @@ -47,6 +49,7 @@ jobs:
- name: Get date for tags
run: echo "DATE_TAG=$(date -I)" >> "$GITHUB_ENV"
- name: Build and push
if: matrix.image.name != 'latest'
uses: docker/build-push-action@v2
with:
push: true
Expand All @@ -58,14 +61,14 @@ jobs:
context: ./docker-images/
file: ./docker-images/${{ matrix.image.name }}.dockerfile
- name: Build and push latest
if: matrix.image.name == 'python3.11'
if: matrix.image.name == 'latest'
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/amd64,linux/arm64
tags: tiangolo/uvicorn-gunicorn:latest-debug
context: ./docker-images/
file: ./docker-images/${{ matrix.image.name }}.dockerfile
file: ./docker-images/python${{ matrix.image.python_version }}.dockerfile
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
Expand Down

0 comments on commit fc0fbfe

Please sign in to comment.