Fixing Workflow

This commit is contained in:
Snoweuph 2024-03-03 16:48:59 +01:00
parent 7385345aa1
commit d76587da00
Signed by: Snoweuph
GPG key ID: A494330694B208EF
3 changed files with 43 additions and 7 deletions

View file

@ -6,7 +6,7 @@ on:
- 'master'
jobs:
build:
build_act:
runs-on: 'ubuntu-latest'
steps:
- name: Install Docker
@ -21,10 +21,36 @@ jobs:
registry: git.euph.dev
username: ${{ secrets.DEPLOY_USER }}
password: ${{ secrets.DEPLOY_SECRET }}
- name: Build and push
- name: Build and push act base image
id: build_act_base
uses: 'https://git.euph.dev/actions/docker-build-push@v5'
with:
context: "{{defaultContext}}:images/actions/act"
push: true
tags: |
git.euph.dev/actions/runner-basic:latest
build_matrix:
needs: build_act
runs-on: 'ubuntu-latest'
if: success('build_act')
strategy:
matrix:
name:
- php
include:
- name: PHP builds
if: matrix.name == 'php'
matrix:
versions: [7.4, 8.0, 8.1, 8.2]
steps:
- name: Build and push ${{ matrix.name}}:${{ matrix.versions }}
uses: 'https://git.euph.dev/actions/docker-build-push@v5'
with:
context: "{{defaultContext}}:images/actions/${{ matrix.name }}"
push: true
tags: |
git.euph.dev/actions/runner-${{ matrix.name }}:${{ matrix.versions }}:latest
env:
PACKAGE_VERSION: ${{ matrix.versions }}

View file

@ -10,6 +10,7 @@ RUN newgrp docker
RUN echo "runner ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/runner
# Installing Dependencies
RUN sudo zypper -n update
RUN zypper -n install git wget curl zip unzip nodejs20
WORKDIR /home/runner

View file

@ -1,7 +1,16 @@
FROM git.euph.dev/actions/runner-basic:latest
RUN sudo zypper -n addrepo https://download.opensuse.org/repositories/devel:languages:php/openSUSE_Factory/devel:languages:php.repo
RUN sudo zypper -n --gpg-auto-import-keys refresh
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
RUN sudo zypper -n install php
RUN php -v
RUN sudo zypper -n addrepo https://download.opensuse.org/repositories/devel:languages:php/openSUSE_Leap_$(grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"')/devel:languages:php.repo
RUN sudo zypper -n --gpg-auto-import-keys refresh
RUN sudo zypper -n update
RUN \
major_version=$(echo ${PACKAGE_VERSION} | cut -d. -f1) && \
minor_version=$(echo ${PACKAGE_VERSION} | cut -d. -f2) && \
sudo zypper -n addlock "php${major_version} < ${PACKAGE_VERSION}"; \
version_upper_bound="${major_version}.$((minor_version + 1))" && \
sudo zypper -n addlock "php${major_version} >= ${version_upper_bound}" && \
sudo zypper -n install "php${major_version}"