From 006384e5cb6585ef8d4c03d3e2a2e78182e0dea4 Mon Sep 17 00:00:00 2001 From: Ralf Lang Date: Fri, 27 Oct 2023 16:45:32 +0200 Subject: [PATCH] Adjust phpdoc job for upstream. Drop satis job --- .github/workflows/phpdoc.yml | 34 ++++++----------- .github/workflows/update-satis.yml | 59 ------------------------------ 2 files changed, 12 insertions(+), 81 deletions(-) delete mode 100644 .github/workflows/update-satis.yml diff --git a/.github/workflows/phpdoc.yml b/.github/workflows/phpdoc.yml index 365812f..3e7c3c8 100644 --- a/.github/workflows/phpdoc.yml +++ b/.github/workflows/phpdoc.yml @@ -1,22 +1,18 @@ # This is a basic workflow to help you get started with Actions -name: PHPDOC +name: dev.horde.org # Controls when the action will run. on: # Triggers the workflow on push or pull request events but only for the master branch push: - branches: - - master - - maintaina-composerfixed - - FRAMEWORK_6_0 # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: run: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Setup github ssh key run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts @@ -30,17 +26,11 @@ jobs: git config --global user.name "PHPDOC CI Job" git config --global user.email "ci-job@maintaina.com" - name: Checkout - uses: actions/checkout@v2 - - name: Checkout Doc Dir - uses: actions/checkout@v2 - with: - repository: maintaina/phpdoc - token: ${{secrets.PHPDOC_TOKEN}} - path: "phpdoc-git" + uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 7.4 + php-version: latest extensions: bcmath, ctype, curl, dom, gd, gettext, iconv, imagick, json, ldap, mbstring, mysql, opcache, openssl, pcntl, pdo, posix, redis, soap, sockets, sqlite, tokenizer, xmlwriter ini-values: post_max_size=512M, max_execution_time=360 coverage: xdebug @@ -51,6 +41,8 @@ jobs: run: | export UUT_DIR=$(pwd) export REPO=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//") + export LCREPO=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print tolower($2)}' | sed -e "s/:refs//") + export ORG=$GITHUB_REPOSITORY_OWNER export WORK_DIR=/home/runner/ export BIN_DIR="${WORK_DIR}/bin" wget https://phpdoc.org/phpDocumentor.phar @@ -58,12 +50,10 @@ jobs: mv phpDocumentor.phar $BIN_DIR/phpdocumentor chmod +x "${BIN_DIR}/phpdocumentor" echo "Creating UUT related dir in docu repo" - mkdir -p $UUT_DIR/phpdoc-git/${GITHUB_REF##*/}/${REPO}/ + mkdir -p $UUT_DIR/phpdoc ## Look into any of lib, src, app (if they exist) but not test, migration, bin, locale or script dirs - $BIN_DIR/phpdocumentor -d $UUT_DIR/lib/ -d $UUT_DIR/src/ -d $UUT_DIR/app/ -t "${UUT_DIR}/phpdoc-git/${GITHUB_REF##*/}/${REPO}/" - cd ${UUT_DIR}/phpdoc-git - git add "${GITHUB_REF##*/}/${REPO}" - php indexer.php ${GITHUB_REF##*/} $REPO - git add index.html index.json - git commit -m "Updated phpdoc for $GITHUB_REPOSITORY (${GITHUB_REF##*/} branch) from ci" - git push + $BIN_DIR/phpdocumentor -d $UUT_DIR/lib/ -d $UUT_DIR/src/ -d $UUT_DIR/app/ -t "${UUT_DIR}/phpdoc/" + cd ${UUT_DIR}/phpdoc + tar zcf phpdoc.tgz * + cd .. + curl ${{ secrets.CI_URI }}/ci/phpdoc/${{ secrets.CI_COMPOSER_VENDOR }}/$REPO/${GITHUB_REF##*/}/${{ matrix.php-versions }} -H "Authorization: Bearer ${{ secrets.CI_BEARER_AUTH_VALUE }}" -T results.tar.gz \ No newline at end of file diff --git a/.github/workflows/update-satis.yml b/.github/workflows/update-satis.yml deleted file mode 100644 index 5049bd0..0000000 --- a/.github/workflows/update-satis.yml +++ /dev/null @@ -1,59 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Update Satis - -# Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the master branch - push: - branches: - - FRAMEWORK_6_0 - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - run: - runs-on: ubuntu-20.04 - steps: - - name: Setup github ssh key - run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts - - name: Setup uut dir - run: | - export REPO=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//") - export UUT_DIR=$(pwd) - export WORK_DIR=~ - export BIN_DIR="${WORK_DIR}/bin" - mkdir -p $BIN_DIR - git config --global user.name "PHPDOC CI Job" - git config --global user.email "ci-job@maintaina.com" - - name: Checkout - uses: actions/checkout@v2 - - name: Checkout satis web dir - uses: actions/checkout@v2 - with: - repository: maintaina-com/maintaina-com.github.io - token: ${{secrets.PHPDOC_TOKEN}} - path: "maintaina-com.github.io" - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 7.4 - extensions: bcmath, ctype, curl, dom, gd, gettext, iconv, imagick, json, ldap, mbstring, mysql, opcache, openssl, pcntl, pdo, posix, redis, soap, sockets, sqlite, tokenizer, xmlwriter - ini-values: post_max_size=512M, max_execution_time=3600 - coverage: xdebug - tools: composer:v2 - - name: Setup Github Token as composer credential - run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} - - name: Run Satis - run: | - export UUT_DIR=$(pwd) - export REPO=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//") - export WORK_DIR=/home/runner/ - export BIN_DIR="${WORK_DIR}/bin" - composer create-project composer/satis:dev-main - php satis/bin/satis build -vvv maintaina-com.github.io/satis.json maintaina-com.github.io/ horde/${REPO,,} - cd maintaina-com.github.io - git add include/ index.html p2/ packages.json - git commit -m "Update for horde/${REPO,,}" - git push