Websoft9 / docker-library

Docker Compose examples of selfhosted FOSS based on official image, just run it.
https://www.websoft9.com
Other
36 stars 24 forks source link

add github action to sysn the same files of PHP runtime for ¥50 #947

Closed chendelin1982 closed 4 days ago

chendelin1982 commented 1 week ago

What type of your feature request?

We should copy below files at PHP folder to other PHP runtime

jinsheng200303 commented 1 week ago

sync_php_files.yml

name: Sync PHP Files
on:
  push:
    branches:
      - dev
    paths:
      - 'apps/php/src/apt_install.sh'
      - 'apps/php/src/cmd.sh'
      - 'apps/php/src/extensions.ini'
      - 'apps/php/src/php_extra.ini'
      - 'apps/php/src/php_install.sh'
jobs:
  sync-php-files:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout source code
      uses: actions/checkout@v2
      with:
        ref: dev

    - name: Sync files to apps/phpfpmapache/src
      run: |
        root_dir=$(pwd)
        source_files_dir="$root_dir/apps/php/src"
        destination_dir="$root_dir/apps/phpfpmapache/src"
        file_list="apt_install.sh,cmd.sh,extensions.ini,php_extra.ini,php_install.sh"
        for file in $(echo $file_list | tr ',' '\n'); do
          cp -f "$source_files_dir/$file" "$destination_dir"
        done

    - name: Sync files to apps/phpfpmnginx/src
      run: |
        root_dir=$(pwd)
        source_files_dir="$root_dir/apps/php/src"
        destination_dir="$root_dir/apps/phpfpmnginx/src"
        file_list="apt_install.sh,cmd.sh,extensions.ini,php_extra.ini,php_install.sh"
        for file in $(echo $file_list | tr ',' '\n'); do
          cp -f "$source_files_dir/$file" "$destination_dir"
        done

    - name: Commit and push changes
      uses: stefanzweifel/git-auto-commit-action@v4
      with:
        commit_message: Sync PHP Files