Fixing Workflow
This commit is contained in:
parent
7385345aa1
commit
d76587da00
3 changed files with 43 additions and 7 deletions
|
@ -6,7 +6,7 @@ on:
|
||||||
- 'master'
|
- 'master'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build_act:
|
||||||
runs-on: 'ubuntu-latest'
|
runs-on: 'ubuntu-latest'
|
||||||
steps:
|
steps:
|
||||||
- name: Install Docker
|
- name: Install Docker
|
||||||
|
@ -21,10 +21,36 @@ jobs:
|
||||||
registry: git.euph.dev
|
registry: git.euph.dev
|
||||||
username: ${{ secrets.DEPLOY_USER }}
|
username: ${{ secrets.DEPLOY_USER }}
|
||||||
password: ${{ secrets.DEPLOY_SECRET }}
|
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'
|
uses: 'https://git.euph.dev/actions/docker-build-push@v5'
|
||||||
with:
|
with:
|
||||||
context: "{{defaultContext}}:images/actions/act"
|
context: "{{defaultContext}}:images/actions/act"
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
git.euph.dev/actions/runner-basic:latest
|
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 }}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ RUN newgrp docker
|
||||||
RUN echo "runner ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/runner
|
RUN echo "runner ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/runner
|
||||||
|
|
||||||
# Installing Dependencies
|
# Installing Dependencies
|
||||||
|
RUN sudo zypper -n update
|
||||||
RUN zypper -n install git wget curl zip unzip nodejs20
|
RUN zypper -n install git wget curl zip unzip nodejs20
|
||||||
|
|
||||||
WORKDIR /home/runner
|
WORKDIR /home/runner
|
||||||
|
|
|
@ -1,7 +1,16 @@
|
||||||
FROM git.euph.dev/actions/runner-basic:latest
|
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
|
ARG PACKAGE_VERSION
|
||||||
RUN sudo zypper -n --gpg-auto-import-keys refresh
|
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
|
||||||
|
|
||||||
RUN sudo zypper -n install php
|
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 php -v
|
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}"
|
Loading…
Reference in a new issue