diff --git a/.gitea/workflows/ubuntu.yaml b/.gitea/workflows/ubuntu.yaml new file mode 100644 index 0000000..744034f --- /dev/null +++ b/.gitea/workflows/ubuntu.yaml @@ -0,0 +1,75 @@ +name: Build and Push Ubuntu Image +on: + push: + branches: + - master + +jobs: + build: + name: Build and push image + runs-on: ubuntu-latest + container: + image: ghcr.io/catthehacker/ubuntu:act-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Login to Docker Winter Access Git Registry + uses: docker/login-action@v3 + with: + registry: git.winteraccess.id + username: aditya.prima + password: ${{ secrets.PATOKEN }} + - name: Login to Docker Registry + uses: docker/login-action@v3 + with: + registry: docker.io + username: aprimediet + password: ${{ secrets.DOCKER_TOKEN }} + - name: Build and push 2.2.23@php5.6 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + PHP_VERSION=5.6 + COMPOSER_VERSION=2.2.23 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:2.2.23-ubuntu-php5.6 + aprimediet/composer:2.2.23-ubuntu-php5.6 + - name: Build and push 2.2.23@php7.4 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + PHP_VERSION=7.4 + COMPOSER_VERSION=2.2.23 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:2.2.23 + git.winteraccess.id/${{ gitea.repository }}:2.2.23-ubuntu + git.winteraccess.id/${{ gitea.repository }}:2.2.23-ubuntu-php7.4 + aprimediet/composer:2.2.23 + aprimediet/composer:2.2.23-ubuntu + aprimediet/composer:2.2.23-ubuntu-php7.4 + - name: Build and push 2.7.2@php8.3 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + PHP_VERSION=8.3 + COMPOSER_VERSION=2.7.2 + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:2.7.2 + git.winteraccess.id/${{ gitea.repository }}:2.7.2-ubuntu + git.winteraccess.id/${{ gitea.repository }}:2.7.2-ubuntu-php8.3 + git.winteraccess.id/${{ gitea.repository }}:latest-ubuntu + git.winteraccess.id/${{ gitea.repository }}:latest + aprimediet/composer:2.7.2 + aprimediet/composer:2.7.2-ubuntu + aprimediet/composer:2.7.2-ubuntu-php8.3 + aprimediet/composer:latest-ubuntu + aprimediet/composer:latest diff --git a/Dockerfile.alpine b/Dockerfile.alpine new file mode 100644 index 0000000..e69de29 diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu new file mode 100644 index 0000000..9b4cb1d --- /dev/null +++ b/Dockerfile.ubuntu @@ -0,0 +1,20 @@ +ARG PHP_VERSION=8.3 +ARG REGISTRY_URL=git.winteraccess.id/docker + +FROM ${REGISTRY_URL}/php:${PHP_VERSION}-ubuntu +LABEL maintainer=" aprimediet@gmail.com" + +ARG PHP_VERSION=8.3 +ARG COMPOSER_VERSION=2.7.2 + +WORKDIR /tmp + +USER root + +# DOWNLOAD COMPOSER +ADD https://getcomposer.org/installer ./composer-setup.php + +RUN php composer-setup.php --version=${COMPOSER_VERSION} && mv composer.phar /usr/local/bin/composer && rm -f ./composer-setup.php + +# CLEAN APT CACHES +RUN apt -y clean \ No newline at end of file