From beaadac092c8ee32d5fdab49f75b7f712e1b1b1c Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Sun, 13 Oct 2024 17:11:45 +0200 Subject: [PATCH] chore: add Upgrade GitHub workflow --- .github/workflows/upgrade.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/upgrade.yml diff --git a/.github/workflows/upgrade.yml b/.github/workflows/upgrade.yml new file mode 100644 index 00000000..7012ff29 --- /dev/null +++ b/.github/workflows/upgrade.yml @@ -0,0 +1,43 @@ +# yaml-language-server: $schema=https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/github-workflow.json +name: Upgrade + +on: + push: + branches: + - chore/release-workflow + workflow_dispatch: ~ + +jobs: + upgrade: + name: Upgrade + if: ${{ github.repository == 'api-platform/demo' }} + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Setup PHP with Composer + uses: shivammathur/setup-php@v2 + with: + tools: composer + - + name: Get Composer Cache Directory + id: composer-cache + working-directory: api + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + - + name: Cache Dependencies + uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + - + name: Install Dependencies + working-directory: api + run: composer install --prefer-dist + - + name: Update API Platform Dependencies + working-directory: api + run: composer update "api-platform/*"