Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Refactor changelog workflow to use reusable workflow #339

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 3 additions & 28 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,8 @@ name: changelog

on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]

jobs:
changelog-entry:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog')}}

steps:
- uses: actions/checkout@v4
- name: Check for CHANGELOG file changes
run: |
# Only the latest commit of the feature branch is available
# automatically. To diff with the base branch, we need to
# fetch that too (and we only need its latest commit).
git fetch origin ${{ github.base_ref }} --depth=1
if [[ $(git diff --name-only FETCH_HEAD | grep --ignore-case CHANGELOG) ]]
then
echo "The CHANGELOG file was modified. Looks good!"
else
echo "The CHANGELOG file was not modified."
echo "Please add a CHANGELOG entry to the appropriate header under \"Unreleased\", or add the \"Skip Changelog\" label if not required."
false
fi
lint-changelog:
runs-on: ubuntu-latest
needs: changelog-entry
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check if CHANGELOG is valid
uses: newrelic/release-toolkit/validate-markdown@v1
check-changelog:
uses: newrelic/k8s-metadata-injection/.github/workflows/changelog-reusable.yml@main
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### bugfix
- Fix bug reported in [NR-153839](https://issues.newrelic.com/browse/NR-153839) by @juanjjaramillo in [#319](https://github.com/newrelic/newrelic-infra-operator/pull/319)
### enhancement
- Update k8s versions in CI by @xqi-nr in https://github.com/newrelic/newrelic-infra-operator/pull/323
- Update k8s versions in CI by @xqi-nr in [#323](https://github.com/newrelic/newrelic-infra-operator/pull/323)
- Refactor `changelog` workflow to use reusable workflow by @juanjjaramillo in [#339](https://github.com/newrelic/newrelic-infra-operator/pull/339)

## [0.10.2]

Expand Down