-
-
Notifications
You must be signed in to change notification settings - Fork 32
50 lines (41 loc) · 1.78 KB
/
bump-modules.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
---
name: "Update Modules base"
on:
workflow_dispatch:
permissions:
contents: write # so it can comment
pull-requests: write # so it can create pull requests
jobs:
update-Modules:
runs-on: ubuntu-22.04
env:
COMMIT_NAME: github-actions[bot]
COMMIT_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
steps:
- name: Clone Firmware
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Configure Git User and E-Mail
run: git config --global user.name "${{ env.COMMIT_NAME }}" && git config --global user.email "${{ env.COMMIT_EMAIL }}"
- name: Get update branch name
id: branch-name
run: echo "branch-name=update-modules-${{ github.ref_name }}-$(date +%s)" >> $GITHUB_OUTPUT
- name: Invoke update-modules
run: ./contrib/actions/update-modules.sh
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@8867c4aba1b742c39f8d0ba35429c2dfa4b6cb20 # v7.0.1
with:
title: '[${{ github.ref_name }}] update modules'
body: |
Update modules for ${{ github.ref_name }} branch
<sub><sup>- Auto-generated by [create-pull-request][1]</sub></sup>
[1]: https://github.com/peter-evans/create-pull-request
branch: ${{ steps.branch-name.outputs.branch-name }}
labels: ${{ github.ref_name }}
draft: true # this step does not trigger a CI run, so always mark them as draft
delete-branch: true
- name: Check outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"