Skip to content

Commit

Permalink
chore: add Upgrade GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentchalamon committed Oct 13, 2024
1 parent 02c8ce1 commit beaadac
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/upgrade.yml
Original file line number Diff line number Diff line change
@@ -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/*"

0 comments on commit beaadac

Please sign in to comment.