Skip to content

Commit

Permalink
Remove new ver (#31)
Browse files Browse the repository at this point in the history
* test auto-assign workflow

* change action

* fix

* new action

* change on values

* remove issues trigger

* change replica count

* remove new ver

* add token

* remove real label

* syntax fix

* test new ver

* fix

* revert

* 1.0.9

* fix #200000000

* fix

* revert
  • Loading branch information
JTaeuber authored Sep 13, 2024
1 parent 74d6e79 commit 2cd4125
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/check-for-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,29 @@ jobs:
fetch-depth: 0

- name: Check for appVersion changes
if: ${{ !contains(github.event.pull_request.labels.*.name, 'new release') }}
run: |
echo "Checking for appVersion changes..."
if git diff origin/${{ github.base_ref }} -- test-chart/Chart.yaml | grep -qe "^[+-]appVersion: "; then
echo "appVersion has changed. Failing the job."
app_version_change=$(echo "version changed")
echo "app_version_change=$app_version_change" >> $GITHUB_ENV
else
app_version_change=$(echo "No appVersion changes detected.")
echo "app_version_change=$app_version_change" >> $GITHUB_ENV
fi
- name: Remove new version label
if: ${{ env.app_version_change == 'No appVersion changes detected.' }}
run: |
echo "No appVersion changes detected. Removing new version label"
gh pr edit ${{ github.event.pull_request.number }} --remove-label "new release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Fail if changes occured
if: ${{ !contains(github.event.pull_request.labels.*.name, 'new release') }}
run: |
if [ "${{ env.app_version_change }}" == "version changed" ]; then
echo "Version changed, exiting..."
exit 1
else
echo "No appVersion changes detected."
Expand Down
2 changes: 1 addition & 1 deletion test-chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
replicaCount: 3
replicaCount: 2

namespace: test

Expand Down

0 comments on commit 2cd4125

Please sign in to comment.