File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 48
48
run : |
49
49
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
50
50
51
- - name : " Commit changes "
51
+ - name : " Check if a release is necessary "
52
52
if : ${{ github.repository_owner == 'puppetlabs' }}
53
+ id : check
54
+ run : |
55
+ git diff --quiet CHANGELOG.md && echo "::set-output name=release::false" || echo "::set-output name=release::true"
56
+
57
+ - name : " Commit changes"
58
+ if : ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
53
59
run : |
54
60
git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
55
61
git config --local user.name "GitHub Action"
59
65
- name : Create Pull Request
60
66
id : cpr
61
67
uses : puppetlabs/peter-evans-create-pull-request@v3
62
- if : ${{ github.repository_owner == 'puppetlabs' }}
68
+ if : ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
63
69
with :
64
70
token : ${{ secrets.GITHUB_TOKEN }}
65
71
commit-message : " Release prep v${{ steps.gv.outputs.ver }}"
75
81
labels : " maintenance"
76
82
77
83
- name : PR outputs
78
- if : ${{ github.repository_owner == 'puppetlabs' }}
84
+ if : ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
79
85
run : |
80
86
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
81
87
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
You can’t perform that action at this time.
0 commit comments