Skip to content

Commit

Permalink
chore(changelog): use reusable changelog workflow (#11549)
Browse files Browse the repository at this point in the history
This avoids code duplication and makes improvements on changelog generation/format easier.
  • Loading branch information
vm-001 authored Sep 20, 2023
1 parent 94fbf7e commit 710489f
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 562 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/changelog-requirement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Changelog Requirement

on:
pull_request:
types: [ opened, synchronize, labeled, unlabeled ]
paths:
- 'kong/**'
- '**.rockspec'
- '.requirements'

jobs:
require-changelog:
if: ${{ !contains(github.event.*.labels.*.name, 'skip-changelog') }}
name: Requires changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- name: computes changed files
id: changelog-check
uses: tj-actions/changed-files@2f7246cb26e8bb6709b6cbfc1fec7febfe82e96a # v37
with:
files: 'CHANGELOG/unreleased/**/*.yaml'

- name: asserts changelog added
run: >
if [ "${{ steps.changelog-check.outputs.added_files_count }}" = "0" ]; then
echo "Should contain at least one changelog file in CHANGELOG/unreleased/*/ directory"
exit 1
fi
17 changes: 17 additions & 0 deletions .github/workflows/changelog-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Changelog Validation

on:
pull_request:
types: [ opened, synchronize ]

jobs:
validate-changelog:
name: Validate changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Validate changelogs
uses: Kong/gateway-changelog@main
with:
files: CHANGELOG/unreleased/*/*.yaml
47 changes: 0 additions & 47 deletions .github/workflows/changelog.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions CHANGELOG/Makefile

This file was deleted.

88 changes: 0 additions & 88 deletions CHANGELOG/README.md

This file was deleted.

Loading

1 comment on commit 710489f

@khcp-gha-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:710489f2d4cdbebf0fa8c9b9f8e2d8e38e749cad
Artifacts available https://github.com/Kong/kong/actions/runs/6246509817

Please sign in to comment.