forked from Job79/devcontainer
feat: add php container
This commit is contained in:
@@ -17,6 +17,7 @@ jobs:
|
|||||||
fedora: ${{ steps.filter.outputs.fedora == 'true' }}
|
fedora: ${{ steps.filter.outputs.fedora == 'true' }}
|
||||||
infra: ${{ steps.filter.outputs.infra == 'true' || 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' }}
|
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'}}
|
any_change: ${{ steps.filter.outputs.workflow == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -28,6 +29,7 @@ jobs:
|
|||||||
fedora: ['containers/fedora/**']
|
fedora: ['containers/fedora/**']
|
||||||
infra: ['containers/infra/**']
|
infra: ['containers/infra/**']
|
||||||
go: ['containers/go/**']
|
go: ['containers/go/**']
|
||||||
|
phhp: ['containers/php/**']
|
||||||
|
|
||||||
base-image:
|
base-image:
|
||||||
needs: [changes]
|
needs: [changes]
|
||||||
@@ -68,13 +70,14 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
container: [infra, go]
|
container: [infra, go, php]
|
||||||
steps:
|
steps:
|
||||||
- name: Check if build needed
|
- name: Check if build needed
|
||||||
id: check
|
id: check
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ matrix.container }}" == "infra" && "${{ needs.changes.outputs.infra }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi
|
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 }}" == "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
|
if [[ "${{ needs.changes.outputs.any_change }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi
|
||||||
- name: Clone repo
|
- name: Clone repo
|
||||||
if: steps.check.outputs.run == 'true'
|
if: steps.check.outputs.run == 'true'
|
||||||
|
|||||||
9
containers/php/Containerfile
Normal file
9
containers/php/Containerfile
Normal file
@@ -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
|
||||||
2
containers/php/config.sh
Normal file
2
containers/php/config.sh
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
arg "-v $HOME/Documents/php:/home/user/Documents/php"
|
||||||
Reference in New Issue
Block a user