forked from Azure/AzOps
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.4 KB
/
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
56
57
---
name: "Dependencies"
on:
schedule:
- cron: '30 1 1,15 * *'
workflow_dispatch:
env:
#
# Branch Name
# As part of the Dependencies workflow we create a temporary branch
# this value can be changed if this name is already reserved for other systems
# within the repository.
#
# Default: automated-dependencies
#
branch: "automated-dependencies"
jobs:
dependencies:
name: "Automated Dependencies"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Configure"
run: |
git config user.name github-actions
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: "Switch"
run: |
git checkout -b ${{ env.branch }}
- name: "Dependencies"
run: |
./scripts/Dependencies.ps1
shell: pwsh
- name: "Updates"
run: ./scripts/UpdateRequiredModules.ps1
shell: pwsh
- name: "Execute"
run: |
FILE=/tmp/updates.json
if [ -f "$FILE" ]; then
git add src/AzOps.psd1
git commit -m 'Update AzOps.psd1'
git push origin ${{ env.branch }}
gh pr create --base 'main' --head ${{ env.branch }} --title 'Bump Dependencies' --body '' --label 'dependencies'
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}