docker-python-poetry/.forgejo/workflows/test.yml
Magnus Walbeck 2bed4ce553
All checks were successful
Build and publish / lint (push) Successful in 3s
Build and publish / python3_9 (push) Successful in 53s
Build and publish / python3_10 (push) Successful in 51s
Build and publish / python3_11 (push) Successful in 50s
Build and publish / python3_12 (push) Successful in 55s
Build and publish / python3_13 (push) Successful in 50s
Also auth for test (#1357)
Reviewed-on: #1357
Co-authored-by: Magnus Walbeck <magnus.walbeck@walbeck.it>
Co-committed-by: Magnus Walbeck <magnus.walbeck@walbeck.it>
2025-02-16 18:25:11 +00:00

159 lines
4.7 KiB
YAML

name: Test
on: pull_request
jobs:
lint:
if: github.ref != 'refs/heads/renovate/*'
runs-on: docker
steps:
- uses: actions/checkout@v4
- uses: https://github.com/hadolint/hadolint-action@v3.1.0
with:
dockerfile: Dockerfile
recursive: true
python3_9:
runs-on: dind
steps:
- uses: actions/checkout@v4
- name: Get docker tags
id: tags
shell: sh
env:
VERSION_TYPE: "docker_env"
APP_NAME: "POETRY"
APP_ENV: "3.9"
DOCKERFILE_PATH: "3.9/Dockerfile"
IMAGE_NAME: "mwalbeck/python-poetry"
run: |
determine-docker-tags
dockerd &
- name: Login to Docker Hub
uses: https://github.com/docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN_RO }}
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Test build
uses: https://github.com/docker/build-push-action@v6
with:
tags: ${{ steps.tags.outputs.tags }}
file: "3.9/Dockerfile"
python3_10:
runs-on: dind
steps:
- uses: actions/checkout@v4
- name: Get docker tags
id: tags
shell: sh
env:
VERSION_TYPE: "docker_env"
APP_NAME: "POETRY"
APP_ENV: "3.10"
DOCKERFILE_PATH: "3.10/Dockerfile"
IMAGE_NAME: "mwalbeck/python-poetry"
run: |
determine-docker-tags
dockerd &
- name: Login to Docker Hub
uses: https://github.com/docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN_RO }}
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Test build
uses: https://github.com/docker/build-push-action@v6
with:
tags: ${{ steps.tags.outputs.tags }}
file: "3.10/Dockerfile"
python3_11:
runs-on: dind
steps:
- uses: actions/checkout@v4
- name: Get docker tags
id: tags
shell: sh
env:
VERSION_TYPE: "docker_env"
APP_NAME: "POETRY"
APP_ENV: "3.11"
DOCKERFILE_PATH: "3.11/Dockerfile"
IMAGE_NAME: "mwalbeck/python-poetry"
run: |
determine-docker-tags
dockerd &
- name: Login to Docker Hub
uses: https://github.com/docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN_RO }}
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Test build
uses: https://github.com/docker/build-push-action@v6
with:
tags: ${{ steps.tags.outputs.tags }}
file: "3.11/Dockerfile"
python3_12:
runs-on: dind
steps:
- uses: actions/checkout@v4
- name: Get docker tags
id: tags
shell: sh
env:
VERSION_TYPE: "docker_env"
APP_NAME: "POETRY"
APP_ENV: "3.12"
DOCKERFILE_PATH: "3.12/Dockerfile"
IMAGE_NAME: "mwalbeck/python-poetry"
run: |
determine-docker-tags
dockerd &
- name: Login to Docker Hub
uses: https://github.com/docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN_RO }}
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Test build
uses: https://github.com/docker/build-push-action@v6
with:
tags: ${{ steps.tags.outputs.tags }}
file: "3.12/Dockerfile"
python3_13:
runs-on: dind
steps:
- uses: actions/checkout@v4
- name: Get docker tags
id: tags
shell: sh
env:
VERSION_TYPE: "docker_env"
APP_NAME: "POETRY"
APP_ENV: "3.13"
DOCKERFILE_PATH: "3.13/Dockerfile"
IMAGE_NAME: "mwalbeck/python-poetry"
run: |
determine-docker-tags
dockerd &
- name: Login to Docker Hub
uses: https://github.com/docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN_RO }}
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Test build
uses: https://github.com/docker/build-push-action@v6
with:
tags: ${{ steps.tags.outputs.tags }}
file: "3.13/Dockerfile"