Skip to content

Commit caa2624

Browse files
author
ranchodeluxe
committed
git diff
1 parent f005471 commit caa2624

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

.github/workflows/pre-release.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,13 @@ jobs:
5353
- name: check for changes in helm-chart directory
5454
id: check_changes
5555
run: |
56-
# fetch all
5756
git fetch --all
58-
59-
# get the list of files changed in the pull request compared to the last commit
60-
CHANGED_FILES=$(git diff --name-only HEAD~)
61-
62-
# check if any files in the helm-chart/ directory have changed
63-
echo "$CHANGED_FILES" | grep -q "^helm-chart/";
64-
if [ $? -eq 0 ]; then
65-
echo
66-
"Changes detected in the helm-chart/ directory."
57+
# check for changes between HEAD and previous commit in a specific directory
58+
if ! git diff --quiet HEAD~ -- ./helm-chart/eoapi/; then
59+
echo "Changes detected in the ./helm-chart/eoapi/ directory."
6760
echo "continue=true" >> $GITHUB_OUTPUT
6861
else
69-
echo "No changes detected in the helm-chart/ directory. Exiting."
62+
echo "No changes detected in the ./helm-chart/eoapi directory. Exiting."
7063
echo "continue=false" >> $GITHUB_OUTPUT
7164
exit 0
7265
fi

docs/release.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ All they need to do is prefix `major: `, `minor: ` or `patch: ` to the PR title
77

88
2. All PRs merged against the base `main` will kick off a "pre-release" workflow that does the following:
99

10-
1. detect if there are changes in the `helm-chart/` directory and if not the "pre-release.yaml" workflow exits gracefully
10+
1. detect if there are changes in the `helm-chart/` directory (if no changes are detected the "pre-release.yaml" workflow exits gracefully)
1111

1212
2. sniff the PR title to determine major, minor or patch bumps
1313

@@ -17,10 +17,10 @@ All they need to do is prefix `major: `, `minor: ` or `patch: ` to the PR title
1717
`'release ${{ env.new_version }} for ${{ github.ref }}@${{ github.sha }}'` and body listing the new chart version
1818

1919

20-
4. The releaser should find this PR, review and merge accordingly
20+
3. The releaser should find this PR, review and merge accordingly
2121

2222

23-
5. Then the releaser should go to the Github release UI/UX and kick off a new release by doing the following:
23+
4. Then the releaser should go to the Github release UI/UX and kick off a new release by doing the following:
2424

2525
1. click "Draft New Release"
2626

@@ -32,5 +32,9 @@ All they need to do is prefix `major: `, `minor: ` or `patch: ` to the PR title
3232

3333
5. click the "Publish release"
3434

35-
6. This last step then kicks off another workflow called "release.yaml" which publishes the helm chart to the
35+
36+
5. This last step then kicks off another GH Actions workflow called "release.yaml" which publishes the helm chart to the
3637
`gh-pages` branch
38+
39+
40+
6. Verify the release is all good by running `helm repo update && helm search repo eoapi --versions`

helm-chart/eoapi/values.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ postgrescluster:
105105
postGISVersion: 3.4
106106
pgBouncerReplicas: 1
107107
monitoring: false
108-
109108
instances:
110109
- name: eoapi
111110
replicas: 1

0 commit comments

Comments
 (0)