Skip to content

Configure Repository Release Branch Settings #105

Configure Repository Release Branch Settings

Configure Repository Release Branch Settings #105

name: Configure Repository Release Branch Settings
#############################################################################################
# The following tasks should be performed whenever a release-* branch is created or updated
# - action-update-description
# - action-assign-topics
# - action-gh-teams-update
# - action-set-branch-protection
# - action-add-autolink
# - TODO: action-set-repo-license
#############################################################################################
on:
workflow_call:
secrets:
token:
description: 'Secret token from caller workflow to access repo'
required: true
create:
branches:
- 'release-*.*'
jobs:
configure_repo:
runs-on: ubuntu-latest
name: Updating repository settings
steps:
- name: Checkout
uses: keyfactor/checkout@v4
with:
token: ${{ secrets.token}}
- name: Update topic from manifest:integration_type
id: update-topic
uses: keyfactor/[email protected]
with:
repo-token: ${{ secrets.token}}
- name: Update description from manifest
id: update-description
uses: keyfactor/[email protected]
with:
repo-token: ${{ secrets.token}}
- name: Update teams for non keyfactor-customer-private repos
id: update-teams
uses: keyfactor/[email protected]
with:
token: ${{ secrets.token}}
configure_branch:
runs-on: ubuntu-latest
name: Configure branch protection
steps:
- name: Checkout tools repo
uses: keyfactor/checkout@v4
with:
repository: keyfactor/action-set-branch-protection
path: my-tools
token: ${{ secrets.token}}
- name: Update the branch protection in this repository for ${{ github.event.ref}}
id: update
uses: ./my-tools
with:
repo-token: ${{ secrets.token}}
protect-branch: ${{ github.event.ref}}
#call-add-autolink:
# runs-on: ubuntu-latest
# steps:
# - name: Add autolink
# uses: fiddlermikey/[email protected]
# with:
# token: ${{ secrets.V2BUILDTOKEN}}
# keyPrefix: 'ab#'
# url: 'https://dev.azure.com/Keyfactor/Integration/_workitems/edit/'