Skip to content

Release cloudnative-pg-v0.20.1 #117

Release cloudnative-pg-v0.20.1

Release cloudnative-pg-v0.20.1 #117

Workflow file for this run

# Create a tag when a PR on a release/v* branch is merged
name: release-tag
on:
pull_request:
types:
- closed
branches:
- main
jobs:
tag:
runs-on: ubuntu-22.04
steps:
-
name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
-
name: Temporarily disable "include administrators" branch protection
if: ${{ always() && github.ref == 'refs/heads/main' }}
id: disable_include_admins
uses: benjefferies/branch-protection-bot@af281f37de86139d1c7a27b91176b5dc1c2c827c # v1.1.2
with:
access_token: ${{ secrets.REPO_GHA_PAT }}
branch: main
enforce_admins: false
-
name: Create tag
if: github.event.pull_request.merged == true && startsWith(${{ github.head_ref }}, "release/")
uses: christophebedard/tag-version-commit@57ffb155fc61c8ab098fcfa273469b532c1d4ce7 # v1.7.0
with:
token: ${{ secrets.REPO_GHA_PAT }}
version_regex: '^Release ([a-z-]+-v[0-9]+\.[0-9]+\.[0-9]+)'
dry_run: false
-
name: Enable "include administrators" branch protection
uses: benjefferies/branch-protection-bot@af281f37de86139d1c7a27b91176b5dc1c2c827c # v1.1.2
if: ${{ always() && github.ref == 'refs/heads/main' }}
with:
access_token: ${{ secrets.REPO_GHA_PAT }}
branch: main
enforce_admins: ${{ steps.disable_include_admins.outputs.initial_status }}