Docker Publish #306
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
name: Docker Publish | |
on: | |
schedule: | |
- cron: '30 22 * * *' | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Docker Login | |
env: | |
DOCKER_USER: ${{secrets.DOCKER_USER}} | |
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | |
- name: Copy .env.sample to .env | |
run: cp .env.sample .env | |
- name: For php8.3 | |
run: PHP_VERSION=8.3 docker-compose -f docker-compose-publish.yml build && PHP_VERSION=8.3 docker-compose -f docker-compose-publish.yml push | |
- name: For php8.2 | |
run: PHP_VERSION=8.2 docker-compose -f docker-compose-publish.yml build && PHP_VERSION=8.2 docker-compose -f docker-compose-publish.yml push | |
- name: For php8.1 | |
run: PHP_VERSION=8.1 docker-compose -f docker-compose-publish.yml build && PHP_VERSION=8.1 docker-compose -f docker-compose-publish.yml push | |
- name: For php8.0 | |
run: PHP_VERSION=8.0 docker-compose -f docker-compose-publish.yml build && PHP_VERSION=8.0 docker-compose -f docker-compose-publish.yml push | |
- name: For php7.4 | |
run: PHP_VERSION=7.4 docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.4 docker-compose -f docker-compose-publish.yml push | |
- name: For php7.3 | |
run: PHP_VERSION=7.3 docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.3 docker-compose -f docker-compose-publish.yml push | |
- name: For php7.2 | |
run: PHP_VERSION=7.2 docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.2 docker-compose -f docker-compose-publish.yml push | |
- name: For php7.1 | |
run: PHP_VERSION=7.1 docker-compose -f docker-compose-publish.yml build && PHP_VERSION=7.1 docker-compose -f docker-compose-publish.yml push |