arzola / composer-update-action

GitHub Actions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

composer update action

update test Maintainability Test Coverage

composer update and create pull request.

Version

ver PHP
v1 7.4
v2 8.0
v3 8.1
master latest

Usage

Create .github/workflows/update.yml

name: composer update

on:
  schedule:
    - cron: '0 0 * * *' #UTC

jobs:
  composer_update_job:
    runs-on: ubuntu-latest
    name: composer update
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: composer update action
        uses: kawax/composer-update-action@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

env

  • COMPOSER_PATH : Specify if using subdirectory. Where composer.json is located.
  • GIT_NAME : git user name
  • GIT_EMAIL : git email
  • APP_SINGLE_BRANCH : If set, the new functionality is enabled.
  • APP_SINGLE_BRANCH_POSTFIX : A postfix for the branch used for updates. Default value is "-updated". If the branch doesn't exist, a new branch will be created with the parent branch name plus the postfix, e.g. "master-updated".
  • GIT_COMMIT_PREFIX : Add a prefix to the commit message and pull request title. E.g. "[UPDATE] "
  • COMPOSER_PACKAGES : Specify which packages should be updated. E.g. "typo3/cms-*". Setting this variable will also run Composer with the --with-dependencies argument.
      - name: composer update action
        uses: kawax/composer-update-action@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          COMPOSER_PATH: /subdir
          GIT_NAME: cu
          GIT_EMAIL: cu@composer-update
          APP_SINGLE_BRANCH: 1
          APP_SINGLE_BRANCH_POSTFIX: -updated
          GIT_COMMIT_PREFIX: '[UPDATE] '
          COMPOSER_PACKAGES: 'typo3/cms-*'

Troubleshooting

Missing PHP extension

foo/bar 1.0.0 requires ext-XXX * -> the requested PHP extension XXX is missing from your system.

Configure platform in your composer.json.

  "config": {
    "platform": {
      "php": "7.2.0", 
      "ext-XXX": "1.0.0"
     }
  },

LICENCE

MIT

About

GitHub Actions

License:MIT License


Languages

Language:PHP 97.4%Language:Dockerfile 2.5%Language:Shell 0.1%