You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes https://t.corp.amazon.com/V1559008677
Move github.event references to env vars to prevent script injection
vulnerabilities in workflow run steps.
This follows the same pattern as
aws-observability/aws-otel-js-instrumentation@3d9ac9d
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
sed -i "s/public static string version = \".*\";/public static string version = \"${DEV_VERSION}\";/" src/AWS.Distro.OpenTelemetry.AutoInstrumentation/Version.cs
100
106
sed -i "s/private readonly string version = \".*\";/private readonly string version = \"${DEV_VERSION}\";/" build/Build.InstallationScripts.cs
101
-
VERSION="${{ github.event.inputs.version }}"
102
-
sed -i -e 's/dotnet:v.*"/dotnet:v'$VERSION'"/' .github/workflows/daily_scan.yml
107
+
VERSION="${{ env.VERSION_INPUT }}"
108
+
sed -i -e 's/dotnet:v.*"/dotnet:v'$VERSION'"/' .github/workflows/daily-scan.yml
109
+
110
+
# for patch releases, avoid merge conflict by manually resolving CHANGELOG with main
111
+
if [[ "${{ env.IS_PATCH_INPUT }}" == "true" ]]; then
112
+
# Copy the patch release entries
113
+
sed -n "/^## v${VERSION}/,/^## v[0-9]/p" CHANGELOG.md | sed '$d' > /tmp/patch_release_section.txt
114
+
git fetch origin main
115
+
git show origin/main:CHANGELOG.md > CHANGELOG.md
116
+
# Insert the patch release entries after Unreleased
gh pr create --title "Post release $VERSION: Update version to $DEV_VERSION" \
115
133
--body "This PR prepares the main branch for the next development cycle by updating the version to $DEV_VERSION and updating the image version to be scanned to the latest released.
116
134
117
135
This PR should only be merge when release for version v$VERSION is success.
118
136
119
137
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice." \
0 commit comments