Docker-Image-Nginx-PHP/.gitea/workflows/build.yml

38 lines
1.9 KiB
YAML

name: Build Nginx and PHP image
run-name: Build Nginx and PHP image image and publish
on: [push]
jobs:
Build-Minecraft-Stats-Image:
runs-on: ubuntu-latest
steps:
- name: Prepare | Setup git
run: |
git config --global user.name "Radim Lipovčan"
git config --global user.email "radim@lipovcan.cz"
#- name: Check out repository code
# uses: actions/checkout@v3
- name: Build | Install Docker
run: |
git clone https://github.com/Ownercz/ubuntu-nginx-php.git .
apt-get update && apt-get install docker.io -y
# - name: Docker | Build u22
# run: |
# echo "${{ secrets.DOCKERHUB_GITEA_TOKEN }}" | docker login -u ownercz --password-stdin
# ls -lah
# docker build -f Dockerfile-u22 -t ownercz/nginx-php:u22 -t ownercz/nginx-php:u22-${{env.GITHUB_SHA}} .
# docker push ownercz/nginx-php:u22
# docker push ownercz/nginx-php:u22-${{env.GITHUB_SHA}}
# - name: Docker | Build u24
# run: |
# echo "${{ secrets.DOCKERHUB_GITEA_TOKEN }}" | docker login -u ownercz --password-stdin
# ls -lah
# docker build -f Dockerfile-u24 -t ownercz/nginx-php:u24 -t ownercz/nginx-php:u24-${{env.GITHUB_SHA}} .
# docker push ownercz/nginx-php:u24
# docker push ownercz/nginx-php:u24-${{env.GITHUB_SHA}}
- name: Docker | Build test
run: |
git checkout 6570fd6acb83ca0b351d3ac21fe28e0ba4d4657c
echo "${{ secrets.DOCKERHUB_GITEA_TOKEN }}" | docker login -u ownercz --password-stdin
ls -lah
docker build -f Dockerfile -t ownercz/nginx-php:test .
docker push ownercz/nginx-php:test