-
-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (69 loc) · 2.53 KB
/
json-master.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: json-updater
on:
pull_request:
branches:
- '*'
tags:
- '*'
push:
branches:
- 'master'
schedule:
- cron: '0 0-23 * * *' # every hour
jobs:
update:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Configure git
run: |
cd json-backups
ls -las
git config --global user.name "github-actions[bot]"
git config --global user.email "[email protected]"
- name: Update files
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
run: |
cd json-backups
ls -las
./update.sh
cd ..
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Atlassian JSON Autoupdated
commit_user_name: stamepicmorg # defaults to "GitHub Actions"
commit_user_email: [email protected] # defaults to "[email protected]"
commit_author: stamepicmorg <[email protected]> # defaults to author of the commit that triggered the run
# - name: "Notify if changes have been detected"
# if: steps.auto-commit-action.outputs.changes_detected == 'true'
# run: |
# echo "Changes! Notify!"
# curl -s --data-urlencode -X POST ${{ secrets.TLG_URL }} -d chat_id=${{ secrets.TLG_CHAT }} -d text="${{ secrets.TLG_TEXT }}" -d "parse_mode=HTML" >> /dev/null
# - name: "Tag new version if changes have been detected"
# if: steps.auto-commit-action.outputs.changes_detected == 'true'
# id: "tag"
# uses: "anothrNick/[email protected]"
# env:
# GITHUB_TOKEN: ${{ secrets.GHT }}
# WITH_V: false
# RELEASE_BRANCHES: main
# DEFAULT_BUMP: patch
# - name: "Create release if changes have been detected"
# if: steps.auto-commit-action.outputs.changes_detected == 'true'
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GHT }}
# with:
# tag_name: ${{ steps.tag.outputs.new_tag }}
# release_name: ${{ steps.tag.outputs.new_tag }}
# commitish: main
# body: "Update stubs"
# - name: "Do nothing if no changes have been detected"
# if: steps.auto-commit-action.outputs.changes_detected == 'false'
# run: echo "No Changes!"