Skip to content

Commit beaadac

Browse files
chore: add Upgrade GitHub workflow
1 parent 02c8ce1 commit beaadac

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/upgrade.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# yaml-language-server: $schema=https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/github-workflow.json
2+
name: Upgrade
3+
4+
on:
5+
push:
6+
branches:
7+
- chore/release-workflow
8+
workflow_dispatch: ~
9+
10+
jobs:
11+
upgrade:
12+
name: Upgrade
13+
if: ${{ github.repository == 'api-platform/demo' }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
-
17+
name: Checkout
18+
uses: actions/checkout@v4
19+
-
20+
name: Setup PHP with Composer
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
tools: composer
24+
-
25+
name: Get Composer Cache Directory
26+
id: composer-cache
27+
working-directory: api
28+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
29+
-
30+
name: Cache Dependencies
31+
uses: actions/cache@v4
32+
with:
33+
path: ${{ steps.composer-cache.outputs.dir }}
34+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
35+
restore-keys: ${{ runner.os }}-composer-
36+
-
37+
name: Install Dependencies
38+
working-directory: api
39+
run: composer install --prefer-dist
40+
-
41+
name: Update API Platform Dependencies
42+
working-directory: api
43+
run: composer update "api-platform/*"

0 commit comments

Comments
 (0)