Skip to content

fix: Ignore release.md #5

fix: Ignore release.md

fix: Ignore release.md #5

Workflow file for this run

name: Release Test Checks
on:
push:
branches:
- release-test
jobs:
build-release:
name: Build a release for the module
runs-on: ubuntu-latest
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Bump version and create changelog
id: bump
uses: commitizen-tools/commitizen-action@master
with:
push: false
github_token: ${{ secrets.GITHUB_TOKEN }}
changelog_increment_filename: release.md
git_redirect_stderr: true
- name: Output the new version number
run: echo '${{ steps.bump.outputs.version }}'
- name: Get the module name
id: module_name
run: |
REPO_NAME="${{ github.event.repository.name }}"
REPO_NAME="${REPO_NAME/tofu-modules-/}"
MODULE_NAME="${REPO_NAME//-/_}"
echo "name=${MODULE_NAME}" >> $GITHUB_OUTPUT
- name: Output the module name
run: echo '${{ steps.module_name.outputs.name }}'
- name: Get the commit message
id: message
run: |
MESSAGE=$(git log --format=%B -n 1)
echo "message=${MESSAGE}" >> $GITHUB_OUTPUT
- name: Open a pull request for the release
uses: peter-evans/create-pull-request@v7
with:
branch: release-${{ steps.bump.outputs.version }}
title: ${{ steps.message.outputs.message }}
release:
name: Build a release for the module
runs-on: ubuntu-latest
if: startsWith(github.event.head_commit.message, 'bump:')
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Print commit message
run: echo ${{ github.event.head_commit.message }}