annotate modules/mysql/.github/workflows/auto_release.yml @ 441:2474a711dfc5

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