1414 runs-on : ubuntu-20.04
1515
1616 steps :
17+
1718 - name : " Honeycomb: Start recording"
1819 uses : puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
1920 with :
@@ -25,18 +26,19 @@ jobs:
2526 run : |
2627 echo STEP_ID="auto-release" >> $GITHUB_ENV
2728 echo STEP_START=$(date +%s) >> $GITHUB_ENV
28-
2929 - name : " Checkout Source"
3030 if : ${{ github.repository_owner == 'puppetlabs' }}
31- uses : actions/checkout@v2
31+ uses : actions/checkout@v3
3232 with :
3333 fetch-depth : 0
3434 persist-credentials : false
3535
36+ # We use the dev tools image here because the PDK image does not have the
37+ # build tools necessary to compile native extensions.
3638 - name : " PDK Release prep"
37- uses : docker://puppet/iac_release:ci
39+ uses : docker://puppet/puppet-dev-tools:4.x
3840 with :
39- args : ' release prep --force'
41+ args : ' pdk release prep --force --debug '
4042 env :
4143 CHANGELOG_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4244
4648 run : |
4749 echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
4850
49- - name : " Commit changes "
51+ - name : " Check if a release is necessary "
5052 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' }}
5159 run : |
5260 git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
5361 git config --local user.name "GitHub Action"
5765 - name : Create Pull Request
5866 id : cpr
5967 uses : puppetlabs/peter-evans-create-pull-request@v3
60- if : ${{ github.repository_owner == 'puppetlabs' }}
68+ if : ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
6169 with :
6270 token : ${{ secrets.GITHUB_TOKEN }}
6371 commit-message : " Release prep v${{ steps.gv.outputs.ver }}"
@@ -73,11 +81,11 @@ jobs:
7381 labels : " maintenance"
7482
7583 - name : PR outputs
76- if : ${{ github.repository_owner == 'puppetlabs' }}
84+ if : ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
7785 run : |
7886 echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
7987 echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
80-
88+
8189 - name : " Honeycomb: Record finish step"
8290 if : ${{ always() }}
8391 run : |
0 commit comments