pdksync_heads/main-0-gf3911d3
This commit is contained in:
16
.github/workflows/auto_release.yml
vendored
16
.github/workflows/auto_release.yml
vendored
@@ -14,6 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
|
||||
- name: "Honeycomb: Start recording"
|
||||
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
|
||||
with:
|
||||
@@ -25,7 +26,6 @@ jobs:
|
||||
run: |
|
||||
echo STEP_ID="auto-release" >> $GITHUB_ENV
|
||||
echo STEP_START=$(date +%s) >> $GITHUB_ENV
|
||||
|
||||
- name: "Checkout Source"
|
||||
if: ${{ github.repository_owner == 'puppetlabs' }}
|
||||
uses: actions/checkout@v2
|
||||
@@ -46,8 +46,14 @@ jobs:
|
||||
run: |
|
||||
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
|
||||
|
||||
- name: "Commit changes"
|
||||
- name: "Check if a release is necessary"
|
||||
if: ${{ github.repository_owner == 'puppetlabs' }}
|
||||
id: check
|
||||
run: |
|
||||
git diff --quiet CHANGELOG.md && echo "::set-output name=release::false" || echo "::set-output name=release::true"
|
||||
|
||||
- name: "Commit changes"
|
||||
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
|
||||
run: |
|
||||
git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
@@ -57,7 +63,7 @@ jobs:
|
||||
- name: Create Pull Request
|
||||
id: cpr
|
||||
uses: puppetlabs/peter-evans-create-pull-request@v3
|
||||
if: ${{ github.repository_owner == 'puppetlabs' }}
|
||||
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: "Release prep v${{ steps.gv.outputs.ver }}"
|
||||
@@ -73,11 +79,11 @@ jobs:
|
||||
labels: "maintenance"
|
||||
|
||||
- name: PR outputs
|
||||
if: ${{ github.repository_owner == 'puppetlabs' }}
|
||||
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
|
||||
run: |
|
||||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
|
||||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
|
||||
|
||||
|
||||
- name: "Honeycomb: Record finish step"
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user