Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
archive

GitHub Action

Development Freezer

v1.0.3

Development Freezer

archive

Development Freezer

Notify contributors about ongoing development freeze

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Development Freezer

uses: redhat-plumbers-in-action/devel-freezer@v1.0.3

Learn more about this action in redhat-plumbers-in-action/devel-freezer

Choose a version

Devel Freezer

GitHub Marketplace Unit Tests Linter CodeQL Check dist/ codecov Mergify Status

Devel Freezer is a GitHub Action that can automatically notify contributors of your open-source project about the state of development. When the project is in development freeze or when the development freeze has ended.

How does it work

TBA ...

Features

  • Ability to comment on Pull Requests predefined messages based on the latest tags
  • Ability to find and update comments from Devel Freezer GitHub Action
  • Policy based configuration using YAML syntax
  • Support for regular expressions for freezing tags definitions
  • And more ...

Usage

name: Development Freezer
on:
  pull_request:
    types: [ opened, reopened, synchronize ]
    branches: [ main ]

permissions:
  contents: read

jobs:
  freezer:
    runs-on: ubuntu-latest
    
    permissions:
      pull-requests: write

    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Development Freezer
        uses: redhat-plumbers-in-action/devel-freezer@latest
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

Note: fetch-depth: 0 is required in order to have access to full history including tags.

policy:
  - tags: ['alpha', 'beta']
    feedback:
      frozen-state: |
        ๐Ÿฅถ We are currently in ...
        ๐Ÿ™ Please ...
      unfreeze-state: |
        ๐Ÿ˜Ž We are no longer in ...

  # Suport for regular expressions
  - tags: ['^\S*-rc\d$']
    feedback:
      frozen-state: |
        We are currently in a development freeze phase.
        Please ...
      unfreeze-state: |
        We had successfully released a new major release.
        We are no longer in a development freeze phase.

Real-life examples

Feel free to try devel-freezer using template repository - @redhat-plumbers-in-action/development-freeze-automation

Configuration options

Action currently accepts the following options:

# ...

- uses: redhat-plumbers-in-action/devel-freezer@latest
  with:
    token: <GitHub token>

# ...

token

Token used to create comments. Minimal required permissions are contents: read and pull-requests: write

  • default value: undefined
  • requirements: required
  • recomended value: secrets.GITHUB_TOKEN

Policy

It's required to define a freezing policy for Action to behave correctly. The policy can be defined using .github/development-freeze.yml configuration file. The structure needs to be as follows:

policy:
  - tags: ['alpha', 'beta']
    feedback:
      frozen-state: |
        ๐Ÿฅถ We are currently in ...
        ๐Ÿ™ Please ...
      unfreeze-state: |
        ๐Ÿ˜Ž We are no longer in ...

  # Suport for regular expressions
  - tags: ['^\S*-rc\d$']
    feedback:
      frozen-state: |
        We are currently in a development freeze phase.
        Please ...
      unfreeze-state: |
        We had successfully released a new major release.
        We are no longer in a development freeze phase.
  # tags: ...

tags keyword

Array of tag names and/or regular expressions describing freezing tag scheme (e.g. ^\S*-rc\d$ for tags like v251-rc1, v252-rc2, etc.). Multiple freezing schemes are supported.

  • requirements: required

feedback.frozen-state keyword

The message that is going to be displayed in form of a comment when development freeze conditions are met. Support for a multi-line string using | YAML syntax.

  • requirements: required

feedback.unfreeze-state keyword

The message that is going to replace the development freeze message when development freeze conditions are no longer met. Support for a multi-line string using | YAML syntax.

  • requirements: required