test
Some checks failed
PHP Image build / Build and Push image to registry (push) Failing after 50s

This commit is contained in:
Andrey Sokolovskiy 2024-12-12 20:00:43 +07:00
parent 707d9ff258
commit 8b04f24430
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,37 @@
name: PHP Image build
run-name: ${{ gitea.actor }} is building ansible docker image 🚀
on: [push]
jobs:
push_to_registry:
name: Build and Push image to registry
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-22.04
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: actions/docker-login-action@v3
with:
registry: git.unbind.ru
username: anry
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: actions/docker-metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: git.unbind.ru/{{ env.GITEA_REPOSITORY }}
- name: Build and push Docker image
id: push
uses: actions/docker-build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Dockerfile
push: true
tags: git.unbind.ru/{{ env.GITEA_REPOSITORY }}:{{ env.GITEA_REF_NAME}}
labels: ${{ steps.meta.outputs.labels }}

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM php:7.4-fpm
RUN apt-get update && apt-get install -y \
libfreetype-dev \
libjpeg62-turbo-dev \
libpng-dev \
libxslt1-dev \
libxml2-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install bcmath xsl xml gettext intl pdo_mysql opcache calendar ffi