diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 08ba1f4..f68577a 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -17,6 +17,7 @@ jobs: fedora: ${{ steps.filter.outputs.fedora == 'true' }} infra: ${{ steps.filter.outputs.infra == 'true' || steps.filter.outputs.fedora == 'true' }} go: ${{ steps.filter.outputs.go == 'true' || steps.filter.outputs.fedora == 'true' }} + php: ${{ steps.filter.outputs.php == 'true' || steps.filter.outputs.fedora == 'true' }} any_change: ${{ steps.filter.outputs.workflow == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}} steps: - uses: actions/checkout@v4 @@ -28,6 +29,7 @@ jobs: fedora: ['containers/fedora/**'] infra: ['containers/infra/**'] go: ['containers/go/**'] + phhp: ['containers/php/**'] base-image: needs: [changes] @@ -68,13 +70,14 @@ jobs: strategy: fail-fast: false matrix: - container: [infra, go] + container: [infra, go, php] steps: - name: Check if build needed id: check run: | if [[ "${{ matrix.container }}" == "infra" && "${{ needs.changes.outputs.infra }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi if [[ "${{ matrix.container }}" == "go" && "${{ needs.changes.outputs.go }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi + if [[ "${{ matrix.container }}" == "php" && "${{ needs.changes.outputs.php }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi if [[ "${{ needs.changes.outputs.any_change }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi - name: Clone repo if: steps.check.outputs.run == 'true' diff --git a/containers/php/Containerfile b/containers/php/Containerfile new file mode 100644 index 0000000..e97378f --- /dev/null +++ b/containers/php/Containerfile @@ -0,0 +1,9 @@ +ARG TAG +FROM job79/fedora:${TAG} +USER root + +RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ + dnf -y --setopt=keepcache=1 install php composer \ + curl -sS https://get.symfony.com/cli/installer | bash + +USER user diff --git a/containers/php/config.sh b/containers/php/config.sh new file mode 100644 index 0000000..4ab88f9 --- /dev/null +++ b/containers/php/config.sh @@ -0,0 +1,2 @@ +#!/bin/bash +arg "-v $HOME/Documents/php:/home/user/Documents/php"