forked from erlang/otp
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (69 loc) · 2.51 KB
/
Copy pathrenovate-vendored-deps.yaml
File metadata and controls
81 lines (69 loc) · 2.51 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
## %CopyrightBegin%
##
## SPDX-License-Identifier: Apache-2.0
##
## Copyright Ericsson AB 2025-2026. All Rights Reserved.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
## %CopyrightEnd%
name: Update vendored dependencies
on:
pull_request:
paths:
- '**/vendor.info'
permissions:
contents: read
jobs:
update-vendored-deps:
runs-on: ubuntu-latest
permissions:
contents: write # Required to push commits
pull-requests: write
if: >
github.event_name == 'pull_request' &&
contains(github.event.pull_request.title, 'update dependency') &&
github.actor == 'renovate-bot'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Git user
run: |
git config user.name "Erlang/OTP"
git config user.email "otp@erlang.org"
- name: Find and process modified vendor.info files
id: update-deps
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: .github/scripts/renovate-vendored-deps.sh origin '${{ github.event.pull_request.base.sha }}' '${{ github.event.pull_request.head.sha }}' | tee vendor.log
- name: Comment on PR with failure log
if: ${{ failure() }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ ! -f vendor.log ]; then
echo "vendor.log not found!"
exit 1
fi
echo "Posting failure log to PR..."
# Truncate log to last ~60k characters to stay under GitHub comment limits
LOG_CONTENT=$(tail -c 60000 vendor.log)
gh pr comment "$GITHUB_REF_NAME" --body "🚨 Vendor update failed. Log output:
\`\`\`text
$LOG_CONTENT
\`\`\`
[🔗 View full GitHub Actions run log]($RUN_URL)"