From 0e0a416cb915f04743e44542cf31cf1ce0a45a6c Mon Sep 17 00:00:00 2001 From: Muhamad Aditya Prima Date: Tue, 20 May 2025 16:30:04 +0700 Subject: [PATCH] Updated action workflows --- .gitea/workflows/php8-almalinux.yaml | 36 +++++++++------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/.gitea/workflows/php8-almalinux.yaml b/.gitea/workflows/php8-almalinux.yaml index b9733ea..3f6c506 100644 --- a/.gitea/workflows/php8-almalinux.yaml +++ b/.gitea/workflows/php8-almalinux.yaml @@ -7,7 +7,7 @@ on: jobs: build: - name: Build PHP 8 container images + name: Build php8-almalinux runs-on: ubuntu-latest container: image: ghcr.io/catthehacker/ubuntu:act-latest @@ -18,6 +18,7 @@ jobs: os_version: "9.5" php_version: "8.4" composer_version: "2.8.9" + latest: 'true' steps: - name: Check out repository code uses: actions/checkout@v4 @@ -29,7 +30,8 @@ jobs: password: ${{ secrets.QUAY_SECRET }} - name: Setup Docker buildx uses: docker/setup-buildx-action@v3 - - name: Build and push php ${{ matrix.flavors.php_version }} + - if: ${{ matrix.flavors.latest != 'true' }} + name: Build and push php ${{ matrix.flavors.php_version }} uses: docker/build-push-action@v5 with: push: true @@ -41,34 +43,18 @@ jobs: COMPOSER_VERSION=${{ matrix.flavors.composer_version }} tags: | quay.io/teras/php:${{ matrix.flavors.php_version }} - build-latest: - name: Build PHP 8 container images - runs-on: ubuntu-latest - needs: - - build - container: - image: ghcr.io/catthehacker/ubuntu:act-latest - steps: - - name: Check out repository code - uses: actions/checkout@v4 - - name: Login to quay.io - uses: docker/login-action@v3 - with: - registry: quay.io - username: ${{ vars.QUAY_USERNAME }} - password: ${{ secrets.QUAY_SECRET }} - - name: Setup Docker buildx - uses: docker/setup-buildx-action@v3 - - name: Build and push php8 latest + - if: ${{ matrix.flavors.latest == 'true' }} + name: Build and push php ${{ matrix.flavors.php_version }} uses: docker/build-push-action@v5 with: push: true context: . - file: 8/Dockerfile.almalinux + file: 8/Dockerfile.${{ matrix.flavors.os }} build-args: | - OS_VERSION=9.5 - PHP_VERSION=8.4 - COMPOSER_VERSION=2.8.9 + OS_VERSION=${{ matrix.flavors.os_version }} + PHP_VERSION=${{ matrix.flavors.php_version }} + COMPOSER_VERSION=${{ matrix.flavors.composer_version }} tags: | + quay.io/teras/php:${{ matrix.flavors.php_version }} quay.io/teras/php:8 quay.io/teras/php:latest