Release cloud-native-postgresql-v0.13.1 #161
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a tag when a PR on a release 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/[email protected] | |
- | |
name: Temporarily disable "include administrators" branch protection | |
if: ${{ always() && github.ref == 'refs/heads/main' }} | |
id: disable_include_admins | |
uses: benjefferies/[email protected] | |
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/[email protected] | |
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/[email protected] | |
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 }} |