Skip to content

added new image

added new image #41

name: publish-to-docker-hub
on: [push]
env:
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_NAMESPACE: ${{ secrets.DOCKER_HUB_NAMESPACE }}
VERSION: ${{ github.sha }}
jobs:
publish_php:
runs-on: ubuntu-latest
env:
IMAGE_NAME: "laravel-dev-image"
LANGUAGE: "php"
LANGUAGE_VERSION: 7.4
steps:
- uses: actions/checkout@v2
- run: echo ${DOCKER_HUB_PASSWORD} | docker login --username "${DOCKER_HUB_USER}" --password-stdin
- run: docker build . --file ${IMAGE_NAME}/Dockerfile -t ${IMAGE_NAME}
- run: docker tag "${IMAGE_NAME}" "${DOCKER_HUB_NAMESPACE}/${IMAGE_NAME}:${LANGUAGE}${LANGUAGE_VERSION}-${VERSION}"
- run: docker push "${DOCKER_HUB_NAMESPACE}/${IMAGE_NAME}:${LANGUAGE}${LANGUAGE_VERSION}-${VERSION}"
publish_php_8_1:
runs-on: ubuntu-latest
env:
IMAGE_NAME: "laravel-dev-image"
LANGUAGE: "php"
PHP_VERSION: 8.1
steps:
- uses: actions/checkout@v2
- run: echo ${DOCKER_HUB_PASSWORD} | docker login --username "${DOCKER_HUB_USER}" --password-stdin
- run: cd php8.1 && docker build . --file Dockerfile -t ${IMAGE_NAME}
- run: docker tag "${IMAGE_NAME}" "${DOCKER_HUB_NAMESPACE}/${IMAGE_NAME}:php${PHP_VERSION}-${VERSION}"
- run: docker push "${DOCKER_HUB_NAMESPACE}/${IMAGE_NAME}:php${PHP_VERSION}-${VERSION}"
publish_python:
runs-on: ubuntu-latest
env:
IMAGE_NAME: "python-dev"
LANGUAGE: "python"
LANGUAGE_VERSION: 3.10
steps:
- uses: actions/checkout@v2
- run: echo ${DOCKER_HUB_PASSWORD} | docker login --username "${DOCKER_HUB_USER}" --password-stdin
- run: docker build . --file ${IMAGE_NAME}/Dockerfile -t ${IMAGE_NAME}
- run: docker tag "${IMAGE_NAME}" "${DOCKER_HUB_NAMESPACE}/${IMAGE_NAME}:${LANGUAGE}${LANGUAGE_VERSION}-${VERSION}"
- run: docker push "${DOCKER_HUB_NAMESPACE}/${IMAGE_NAME}:${LANGUAGE}${LANGUAGE_VERSION}-${VERSION}"
publish_node_pnpm:
runs-on: ubuntu-latest
env:
IMAGE_NAME: "node"
LANGUAGE: "node"
LANGUAGE_VERSION: 18
steps:
- uses: actions/checkout@v2
- run: echo ${DOCKER_HUB_PASSWORD} | docker login --username "${DOCKER_HUB_USER}" --password-stdin
- run: docker build . --file ${IMAGE_NAME}/Dockerfile -t ${IMAGE_NAME}
- run: docker tag "${IMAGE_NAME}" "${DOCKER_HUB_NAMESPACE}/${IMAGE_NAME}:${LANGUAGE}${LANGUAGE_VERSION}-${VERSION}"
- run: docker push "${DOCKER_HUB_NAMESPACE}/${IMAGE_NAME}:${LANGUAGE}${LANGUAGE_VERSION}-${VERSION}"