-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (49 loc) · 1.78 KB
/
update_dependencies.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Update Dependencies
on:
workflow_dispatch:
schedule:
- cron: '15 14 * * 1' # weekly, on Monday morning (UTC)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ILIOS_DEPLOYMENT_WEBHOOK_URL }}
jobs:
update:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use PHP 8.2
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: 8.2
extensions: apcu
- name: install composer-lock-diff
run: composer global require davidrjonas/composer-lock-diff
- name: update dependencies
run: composer update
- name: Prepare Messages
id: vars
run: |
lockDiff="$(composer-lock-diff --md)"
# We have to manually escape new lines
lockDiff="${lockDiff//$'\n'/'%0A'}"
echo ::set-output name=pr_title::"Update Dependencies"
echo ::set-output name=commit_message::"Update Dependencies \
${lockDiff}."
echo ::set-output name=pr_body::"${lockDiff}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.ZORGBORT_TOKEN }}
title: ${{ steps.vars.outputs.pr_title }}
body: ${{ steps.vars.outputs.pr_body }}
commit-message: ${{ steps.vars.outputs.commit_message }}
branch: auto-update-dependencies
committer: Zorgbort <[email protected]>
author: Zorgbort <[email protected]>
labels: dependencies
- uses: act10ns/[email protected]
with:
status: ${{ job.status }}
message: Update Dependency Job Failed {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
if: failure()