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

Remove new ver #31

Merged
merged 18 commits into from
Sep 13, 2024
15 changes: 15 additions & 0 deletions .github/workflows/assign.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Auto Author Assign

on:
pull_request:
types: [opened, reopened]

permissions:
issues: write
pull-requests: write

jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/[email protected]
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