-
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.
chore: Improve autotag and build rpm again
This should hopefully tag and have all the variables accessible without issue.
- Loading branch information
Showing
2 changed files
with
15 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,12 @@ | |
name: Build release RPMs | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Auto Tag] | ||
types: | ||
- completed | ||
workflow_call: | ||
inputs: | ||
tag: | ||
required: false | ||
type: string | ||
default: "v0.0.0" | ||
push: | ||
tags: | ||
- v* | ||
|
@@ -32,23 +34,23 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
- name: Get tag | ||
if: ${{ github.event_name != 'release' }} | ||
if: startsWith(github.event.ref, 'refs/tags/') | ||
id: tag | ||
uses: devops-actions/[email protected] | ||
with: | ||
strip_v: true # Optional: Remove 'v' character from version | ||
default: ${{ github.event.inputs.tag }} # Optional: Default version when tag not found | ||
default: ${{ inputs.tag }} # Optional: Default version when tag not found | ||
|
||
- name: Update specfile to match tag | ||
if: ${{ github.event_name != 'release' && steps.tag.outputs.tag != '0.0.0' }} | ||
if: startsWith(github.event.ref, 'refs/tags/') && ${{ steps.tag.outputs.tag != '0.0.0' }} | ||
uses: jacobtomlinson/gha-find-replace@v3 | ||
with: | ||
include: "packaging/convert2rhel.spec" | ||
find: "(Version: +).*" | ||
replace: "${1}${{steps.tag.outputs.tag}}" | ||
|
||
- name: Update convert2rhel version to match tag | ||
if: ${{ github.event_name != 'release' && steps.tag.outputs.tag != '0.0.0' }} | ||
if: startsWith(github.event.ref, 'refs/tags/') && ${{ steps.tag.outputs.tag != '0.0.0' }} | ||
uses: jacobtomlinson/gha-find-replace@v3 | ||
with: | ||
include: "convert2rhel/__init__.py" | ||
|