-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This changes the label requirement workflows and other code styling related workflows to better align with the current state of the repo. This also changes the rpm generation to hopefully be better than the current generation as the current one does not generate anything when tags are pushed
- Loading branch information
Showing
9 changed files
with
111 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,32 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- no-changelog | ||
- skip/changelog | ||
authors: | ||
- dependabot | ||
- pre-commit-ci | ||
- renovate | ||
categories: | ||
- title: Breaking Changes 🛠 | ||
labels: | ||
- kind/breaking | ||
- breaking-change | ||
- title: Enhancements 🎉 | ||
labels: | ||
- kind/feature | ||
- enhancement | ||
- title: Security Hardening 🔒 | ||
labels: | ||
- kind/security | ||
- security-hardening | ||
- title: Bug Fixes 🐛 | ||
labels: | ||
- kind/bug-fix | ||
- bug-fix | ||
- title: Test Coverage Enhancements 🔧 | ||
labels: | ||
- kind/tests | ||
- test-coverage-enhancement | ||
- title: Other Changes | ||
labels: | ||
- "*" | ||
- "kind/*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
name: Build release RPMs | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
setup_version: | ||
name: "Setup Convert2RHEL version" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get tag | ||
if: ${{ github.event_name != 'release' }} | ||
id: tag | ||
uses: devops-actions/action-get-tag@v1.0.3 | ||
with: | ||
strip_v: true # Optional: Remove 'v' character from version | ||
default: v0.0.0 # Optional: Default version when tag not found | ||
|
||
- name: Update specfile to match tag | ||
if: ${{ github.event_name != 'release' }} | ||
uses: richardrigutins/replace-in-files@v2 | ||
with: | ||
files: "packaging/convert2rhel.spec" | ||
search-text: "/(Version: +).*/gi" | ||
replacement-text: "$1${{steps.tag.outputs.tag}}" | ||
|
||
- name: Update convert2rhel version to match tag | ||
if: ${{ github.event_name != 'release' }} | ||
uses: richardrigutins/replace-in-files@v2 | ||
with: | ||
files: "convert2rhel/__init__.py" | ||
search-text: "/(__version__ += +).*/gi" | ||
replacement-text: '$1"${{steps.tag.outputs.tag}}"' | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: github-repo | ||
path: "" | ||
retention-days: 1 | ||
|
||
build_rpms: | ||
needs: | ||
- setup_version | ||
name: Build EL${{ matrix.el.ver }} RPM | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
el: | ||
- ver: 7 | ||
- ver: 8 | ||
- ver: 9 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: github-repo | ||
|
||
- name: Build RPM package for EL${{ matrix.el.ver }} | ||
run: | | ||
make rpm${{ matrix.el.ver }} | ||
- uses: shogo82148/actions-upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: .rpms/*el${{ matrix.el.ver }}* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
name: Enforce PR labels | ||
name: Require PR labels | ||
|
||
on: | ||
pull_request: | ||
types: [labeled, unlabeled, opened, edited, synchronize] | ||
types: [opened, labeled, unlabeled, synchronize] | ||
jobs: | ||
enforce-label: | ||
if: github.actor != 'dependabot' || github.actor != 'pre-commit-ci' | ||
require-type-label: | ||
if: ${{ contains(fromJson('["dependabot", "pre-commit-ci", "renovate"]'), github.actor ) }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: yogevbd/enforce-label-action@2.2.2 | ||
- uses: mheap/github-action-required-labels@v5 | ||
with: | ||
REQUIRED_LABELS_ANY: "breaking-change,bug-fix,documentation,enhancement,security-hardening,test-coverage-enhancement,no-changelog" | ||
mode: exactly | ||
count: 1 | ||
labels: "kind/.*" | ||
use_regex: true | ||
require-verification-label: | ||
if: ${{ contains(fromJson('["dependabot", "pre-commit-ci", "renovate"]'), github.actor ) }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: mheap/github-action-required-labels@v5 | ||
with: | ||
mode: exactly | ||
count: 1 | ||
labels: "tests/.*" | ||
use_regex: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters