Skip to content

Commit fa15af2

Browse files
committed
check only if windowsAgent.tag was changed
1 parent 29fc9e2 commit fa15af2

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

.github/workflows/build-windows-infra-agent.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,17 @@ jobs:
1515
new_agent_version: ${{ steps.version-check.outputs.new_agent_version }}
1616
steps:
1717
- uses: actions/checkout@v4
18-
- name: Check for version change
18+
- name: Check if windowsAgent.tag was modified
1919
id: version-check
2020
run: |
21-
OLD_VERSION=$(git show ${{ github.event.before }}:charts/newrelic-infrastructure/values.yaml | yq '.windowsAgent.tag')
22-
NEW_VERSION=$(yq '.windowsAgent.tag' charts/newrelic-infrastructure/values.yaml)
23-
24-
echo "Old version: $OLD_VERSION"
25-
echo "New version: $NEW_VERSION"
26-
27-
if [ "$OLD_VERSION" != "$NEW_VERSION" ]; then
21+
if git diff --name-only HEAD~1 HEAD | grep -q 'charts/newrelic-infrastructure/values.yaml'; then
22+
NEW_VERSION=$(yq '.windowsAgent.tag' charts/newrelic-infrastructure/values.yaml)
23+
echo "windowsAgent.tag was modified. New version: $NEW_VERSION"
2824
echo "version_changed=true" >> $GITHUB_OUTPUT
25+
echo "new_agent_version=$NEW_VERSION" >> $GITHUB_OUTPUT
2926
else
27+
echo "windowsAgent.tag was not modified."
3028
echo "version_changed=false" >> $GITHUB_OUTPUT
31-
fi
32-
33-
echo "new_agent_version=$NEW_VERSION" >> $GITHUB_OUTPUT
3429
3530
build:
3631
name: Build integration for

charts/newrelic-infrastructure/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ images:
4242
windowsAgent:
4343
registry: ""
4444
repository: newrelic/infrastructure-agent
45-
tag: 1.62.0
45+
tag: 1.63.0
4646
pullPolicy: IfNotPresent
4747

4848
enableWindows: false

0 commit comments

Comments
 (0)