7 HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
8 HONEYCOMB_DATASET: litmus tests
9 CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 name: "Automatic release prep"
18 - name: "Honeycomb: Start recording"
19 uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
21 apikey: ${{ env.HONEYCOMB_WRITEKEY }}
22 dataset: ${{ env.HONEYCOMB_DATASET }}
23 job-status: ${{ job.status }}
25 - name: "Honeycomb: start first step"
27 echo STEP_ID="auto-release" >> $GITHUB_ENV
28 echo STEP_START=$(date +%s) >> $GITHUB_ENV
29 - name: "Checkout Source"
30 if: ${{ github.repository_owner == 'puppetlabs' }}
31 uses: actions/checkout@v2
34 persist-credentials: false
36 - name: "PDK Release prep"
37 uses: docker://puppet/iac_release:ci
39 args: 'release prep --force'
41 CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44 if: ${{ github.repository_owner == 'puppetlabs' }}
47 echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
49 - name: "Check if a release is necessary"
50 if: ${{ github.repository_owner == 'puppetlabs' }}
53 git diff --quiet CHANGELOG.md && echo "::set-output name=release::false" || echo "::set-output name=release::true"
55 - name: "Commit changes"
56 if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
58 git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
59 git config --local user.name "GitHub Action"
61 git commit -m "Release prep v${{ steps.gv.outputs.ver }}"
63 - name: Create Pull Request
65 uses: puppetlabs/peter-evans-create-pull-request@v3
66 if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
68 token: ${{ secrets.GITHUB_TOKEN }}
69 commit-message: "Release prep v${{ steps.gv.outputs.ver }}"
70 branch: "release-prep"
72 title: "Release prep v${{ steps.gv.outputs.ver }}"
74 Automated release-prep through [pdk-templates](https://github.com/puppetlabs/pdk-templates/blob/main/moduleroot/.github/workflows/auto_release.yml.erb) from commit ${{ github.sha }}.
75 Please verify before merging:
76 - [ ] last [nightly](https://github.com/${{ github.repository }}/actions/workflows/nightly.yml) run is green
77 - [ ] [Changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) is readable and has no unlabeled pull requests
78 - [ ] Ensure the [changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) version and [metadata](https://github.com/${{ github.repository }}/blob/release-prep/metadata.json) version match
82 if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
84 echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
85 echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
87 - name: "Honeycomb: Record finish step"
90 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Finished auto release workflow'