Mercurial > repos > other > Puppet
annotate modules/inifile/.github/workflows/auto_release.yml @ 386:3fce34f642f1
Add a PHP module to handle platform differences
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 03 Jan 2022 17:09:39 +0000 |
parents | |
children |
rev | line source |
---|---|
386
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
1 name: "Auto release" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
2 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
3 on: |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
4 workflow_dispatch: |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
5 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
6 env: |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
7 HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
8 HONEYCOMB_DATASET: litmus tests |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
9 CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
10 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
11 jobs: |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
12 auto_release: |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
13 name: "Automatic release prep" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
14 runs-on: ubuntu-20.04 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
15 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
16 steps: |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
17 - name: "Honeycomb: Start recording" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
18 uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
19 with: |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
20 apikey: ${{ env.HONEYCOMB_WRITEKEY }} |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
21 dataset: ${{ env.HONEYCOMB_DATASET }} |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
22 job-status: ${{ job.status }} |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
23 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
24 - name: "Honeycomb: start first step" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
25 run: | |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
26 echo STEP_ID="auto-release" >> $GITHUB_ENV |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
27 echo STEP_START=$(date +%s) >> $GITHUB_ENV |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
28 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
29 - name: "Checkout Source" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
30 if: ${{ github.repository_owner == 'puppetlabs' }} |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
31 uses: actions/checkout@v2 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
32 with: |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
33 fetch-depth: 0 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
34 persist-credentials: false |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
35 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
36 - name: "PDK Release prep" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
37 uses: docker://puppet/iac_release:ci |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
38 with: |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
39 args: 'release prep --force' |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
40 env: |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
41 CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
42 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
43 - name: "Get Version" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
44 if: ${{ github.repository_owner == 'puppetlabs' }} |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
45 id: gv |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
46 run: | |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
47 echo "::set-output name=ver::$(jq --raw-output .version metadata.json)" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
48 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
49 - name: "Commit changes" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
50 if: ${{ github.repository_owner == 'puppetlabs' }} |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
51 run: | |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
52 git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
53 git config --local user.name "GitHub Action" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
54 git add . |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
55 git commit -m "Release prep v${{ steps.gv.outputs.ver }}" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
56 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
57 - name: Create Pull Request |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
58 id: cpr |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
59 uses: puppetlabs/peter-evans-create-pull-request@v3 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
60 if: ${{ github.repository_owner == 'puppetlabs' }} |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
61 with: |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
62 token: ${{ secrets.GITHUB_TOKEN }} |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
63 commit-message: "Release prep v${{ steps.gv.outputs.ver }}" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
64 branch: "release-prep" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
65 delete-branch: true |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
66 title: "Release prep v${{ steps.gv.outputs.ver }}" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
67 body: | |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
68 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 }}. |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
69 Please verify before merging: |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
70 - [ ] last [nightly](https://github.com/${{ github.repository }}/actions/workflows/nightly.yml) run is green |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
71 - [ ] [Changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) is readable and has no unlabeled pull requests |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
72 - [ ] 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 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
73 labels: "maintenance" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
74 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
75 - name: PR outputs |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
76 if: ${{ github.repository_owner == 'puppetlabs' }} |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
77 run: | |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
78 echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
79 echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
80 |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
81 - name: "Honeycomb: Record finish step" |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
82 if: ${{ always() }} |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
83 run: | |
3fce34f642f1
Add a PHP module to handle platform differences
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
84 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Finished auto release workflow' |