-
Notifications
You must be signed in to change notification settings - Fork 7
64 lines (54 loc) · 2.6 KB
/
create-dependencies-pr.yaml
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
name: Update Dependencies
on:
workflow_dispatch:
repository_dispatch:
types: [OpenActive.NET-update,OpenActive.DatasetSite.NET-update]
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout OpenActive.Server.NET
uses: actions/checkout@v2
with:
ref: master
- name: Setup .NET 6.0.x
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Update OpenActive.NET to latest version in OpenActive.Server.NET
run: dotnet add package OpenActive.NET
working-directory: ./OpenActive.Server.NET/
- name: Update OpenActive.DatasetSite.NET to latest version in OpenActive.Server.NET
run: dotnet add package OpenActive.DatasetSite.NET
working-directory: ./OpenActive.Server.NET/
- name: Update OpenActive.NET to latest version in OpenActive.FakeDatabase.NET
run: dotnet add package OpenActive.NET
working-directory: ./Fakes/OpenActive.FakeDatabase.NET/
- name: git stash if material changes have not been made
# When considering whether it's worth making a PR, ignore the following:
# - Any updates to the package.json or package-lock.json files in OpenActive.DatasetSite.NET.Generator (not worth creating a PR JUST for these if the template itself has not been updated)
# git stashing if no material changes allows the next step to close the PR if one is already open
run: if [ "$(git diff --numstat | grep -vc '^.*package\.json\|.*package-lock\.json$')" -eq "0" ]; then git stash; else echo "Material changes found"; fi
working-directory: ./
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
path: .
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
commit-message: Update dependencies
committer: openactive-bot <openactive-bot@users.noreply.github.com>
author: openactive-bot <openactive-bot@users.noreply.github.com>
signoff: false
branch: ci/update-data-models
delete-branch: true
title: 'Update dependencies'
body: |
Update to use latest version of [OpenActive.NET](https://github.com/openactive/OpenActive.NET/) and [OpenActive.DatasetSite.NET](https://github.com/openactive/OpenActive.DatasetSite.NET/)
labels: |
automated pr
draft: false
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"