From 85246b08174893d969f2f237917852a52277988f Mon Sep 17 00:00:00 2001 From: Aditya Prima Date: Thu, 12 Sep 2024 01:50:23 +0700 Subject: [PATCH] Added docker io push registry --- .gitea/workflows/alpine-dockerio.yaml | 119 ++++++++++++++++++++++++++ .gitea/workflows/ubuntu-dockerio.yaml | 117 +++++++++++++++++++++++++ 2 files changed, 236 insertions(+) create mode 100644 .gitea/workflows/alpine-dockerio.yaml create mode 100644 .gitea/workflows/ubuntu-dockerio.yaml diff --git a/.gitea/workflows/alpine-dockerio.yaml b/.gitea/workflows/alpine-dockerio.yaml new file mode 100644 index 0000000..f69c1b3 --- /dev/null +++ b/.gitea/workflows/alpine-dockerio.yaml @@ -0,0 +1,119 @@ +name: Build and Push Alpine PHP 8.3 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: docker.io + username: aprimediet + password: ${{ secrets.DOCKER_TOKEN }} + - name: Build and push 5.6 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + REGISTRY_URL=docker.io/aprimediet + ALPINE_VERSION=3.5 + PHP_VERSION=5 + push: true + tags: | + aprimediet/php:5.6-alpine + - name: Build and push 7.2 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + REGISTRY_URL=docker.io/aprimediet + ALPINE_VERSION=3.9 + PHP_VERSION=7 + push: true + tags: | + aprimediet/php:7.2-alpine + - name: Build and push 7.3 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + REGISTRY_URL=docker.io/aprimediet + ALPINE_VERSION=3.10 + PHP_VERSION=7 + push: true + tags: | + aprimediet/php:7.3-alpine + - name: Build and push 7.4 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + REGISTRY_URL=docker.io/aprimediet + ALPINE_VERSION=3.13 + PHP_VERSION=7 + push: true + tags: | + aprimediet/php:7.4-alpine + - name: Build and push 8.0 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + REGISTRY_URL=docker.io/aprimediet + ALPINE_VERSION=3.16 + PHP_VERSION=8 + push: true + tags: | + aprimediet/php:8.0-alpine + - name: Build and push 8.1 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + REGISTRY_URL=docker.io/aprimediet + ALPINE_VERSION=3.18 + PHP_VERSION=81 + push: true + tags: | + aprimediet/php:8.1-alpine + - name: Build and push 8.2 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + REGISTRY_URL=docker.io/aprimediet + ALPINE_VERSION=3.18 + PHP_VERSION=82 + push: true + tags: | + aprimediet/php:8.2-alpine + - name: Build and push 8.3 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.alpine + build-args: | + REGISTRY_URL=docker.io/aprimediet + ALPINE_VERSION=3.19 + PHP_VERSION=83 + push: true + tags: | + aprimediet/php:8-alpine + aprimediet/php:8.3-alpine + aprimediet/php:latest-alpine \ No newline at end of file diff --git a/.gitea/workflows/ubuntu-dockerio.yaml b/.gitea/workflows/ubuntu-dockerio.yaml new file mode 100644 index 0000000..54fe649 --- /dev/null +++ b/.gitea/workflows/ubuntu-dockerio.yaml @@ -0,0 +1,117 @@ +name: Build and Push Ubuntu PHP 8.3 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: Build and push 5.6 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBUNTU_VERSION=jammy + PHP_VERSION=5.6 + push: true + tags: | + REGISTRY_URL=docker.io/aprimediet + aprimediet/php:5.6-ubuntu + aprimediet/php:5.6 + - name: Build and push 7.2 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBUNTU_VERSION=jammy + PHP_VERSION=7.2 + push: true + tags: | + aprimediet/php:7.2-ubuntu + aprimediet/php:7.2 + - name: Build and push 7.4 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBUNTU_VERSION=jammy + PHP_VERSION=7.4 + push: true + tags: | + aprimediet/php:7.4-ubuntu + aprimediet/php:7.4 + - name: Build and push 8.0 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBUNTU_VERSION=jammy + PHP_VERSION=8.0 + push: true + tags: | + aprimediet/php:8.0-ubuntu + aprimediet/php:8.0 + - name: Build and push 8.1 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBUNTU_VERSION=jammy + PHP_VERSION=8.1 + push: true + tags: | + aprimediet/php:8.1-ubuntu + aprimediet/php:8.1 + - name: Build and push 8.2 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBUNTU_VERSION=jammy + PHP_VERSION=8.2 + push: true + tags: | + aprimediet/php:8.2-ubuntu + aprimediet/php:8.2 + - name: Build and push 8.3 + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.ubuntu + build-args: | + REGISTRY_URL=docker.io/aprimediet + UBUNTU_VERSION=jammy + PHP_VERSION=8.3 + push: true + tags: | + aprimediet/php:8.3-ubuntu + aprimediet/php:8.3 + aprimediet/php:8 + aprimediet/php:latest-ubuntu + aprimediet/php:latest + \ No newline at end of file