Skip to content

Commit 4223efe

Browse files
authored
Fix: workflow triggers for release are broken (#12)
* feature: add templates for scripts via env variables * fix: bundle versioning * fix: define variable OPERATOR_VERSION_STRICT * fix: workflow_dispatch trigger * fix: only run buildah on changes * fix: add variables to release output; use latest for buildah * fix: do not use comments in env definitions for actions * fix: use semver compliant strings for dev branches * fix: allow every branch to get current semver info * use current branch to compare tags * output current version on error * fix: use correct branch on semvercheck * fix: no current_strict available * fix: feature branches develop for next release * fix: update operator-sdk version * fix: remove deprecated config * fix: remove deprecated manager-config * fix: remove manager_config_patch.yaml from config * fix: add basic configs * fix: missing templates in dockerfile * fix: put templates in correct directory * fix: make leader election configurable; add runAsUser * fix: add container Capabilities * fix: use upstream buildah image * fix: make templates work with dockerfiles * fix: do not deploy for now * fix: add missing docker copy entries * fix: adjust workflow * fix: use semver on all branches for olm * fix: calculate semver from dev * fix: calculate correct changelog
1 parent b60988f commit 4223efe

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/main.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ jobs:
5555
uses: ietf-tools/semver-action@v1.5.1
5656
with:
5757
token: ${{ github.token }}
58-
branch: ${{ github.ref_name }}
58+
# fall back to dev because we want to have a valid semver
59+
branch: ${{ fromJSON('{"main":"dev"}')[github.ref_name] || github.ref_name }}
5960
noVersionBumpBehavior: current
6061

6162
- name: Set OPERATOR_VERSION
@@ -193,10 +194,11 @@ jobs:
193194
steps:
194195
- name: Update CHANGELOG
195196
id: changelog
196-
uses: requarks/changelog-action@v1.8.0
197+
uses: requarks/changelog-action@v1.8.1
197198
with:
198199
token: ${{ github.token }}
199-
fromTag: ${{ github.ref_name }}
200+
# calculate the changelog from the last tag to the current dev state
201+
fromTag: ${{ fromJSON('{"main":"dev"}')[github.ref_name] || github.ref_name }}
200202
toTag: ${{ env.CURRENT }}
201203
# Create a new release on GitHub with the semantic OPERATOR_VERSION number
202204
- name: Create Release

0 commit comments

Comments
 (0)