Create PR to update elife api dependencies to latest #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create PR to update api-sdk dependency to latest | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 4 * * 1' | |
jobs: | |
update-api-dummy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check for api-sdk updates | |
run: | | |
docker compose run --no-deps setup composer install | |
docker compose run --no-deps setup composer update 'elife/api' 'elife/api-sdk' --no-suggest --no-interaction | |
- id: get-api-sdk-version | |
run: echo api-sdk-version=$(jq -r '.packages[]|select(.name == "elife/api-sdk").source.reference' < composer.lock) >> $GITHUB_OUTPUT | |
- id: get-api-version | |
run: echo api-version=$(jq -r '.packages[]|select(.name == "elife/api").version' < composer.lock) >> $GITHUB_OUTPUT | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
add-paths: composer.lock | |
commit-message: | | |
Update elife API packages: | |
- `elife/api` to `${{ steps.get-api-version.outputs.api-sdk-version }}` | |
- `elife/api-sdk` to `${{ steps.get-api-sdk-version.outputs.api-sdk-version }}` | |
branch: update-api-sdk | |
title: Update elife API packages(`elife/api`:`${{ steps.get-api-version.outputs.api-sdk-version }}` - `elife/api-sdk`:`${{ steps.get-api-sdk-version.outputs.api-sdk-version }}`) | |
body: | | |
Update elife API packages: | |
- `elife/api` to `${{ steps.get-api-version.outputs.api-sdk-version }}` | |
- `elife/api-sdk` to `${{ steps.get-api-sdk-version.outputs.api-sdk-version }}` |