From bdc1c7a07699e6d7e068ae258278449f7db127f1 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Wed, 22 May 2024 17:54:08 +0000 Subject: [PATCH] [build]: update for release notes generate [deploy] Signed-off-by: Viet Nguyen Duc --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/workflows/deploy.yml | 14 ++++++++++++++ Makefile | 2 +- generate_release_notes.sh | 2 +- update_tag_in_docs_and_files.sh | 2 +- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index f0a22e54b..d3ff0a6b6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -64,6 +64,6 @@ body: attributes: label: Selenium Grid chart version (chart version) description: What version of Selenium Grid chart are you using? - placeholder: 0.30.0? + placeholder: 0.31.1? validations: required: false diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f32dba25b..5f64d1210 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,6 +13,11 @@ on: required: false type: boolean default: false + skip-commit: + description: 'Skip the commit' + required: false + type: boolean + default: false push: branches: - trunk @@ -121,18 +126,27 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} delete_release: true - name: Commit files + if: env.LATEST_TAG != env.NEXT_TAG && github.event.inputs.skip-commit != 'true' run: | git config --local user.email "selenium-ci@users.noreply.github.com" git config --local user.name "Selenium CI Bot" git commit -m "Update tag in docs and files" -a - name: Push changes + if: env.LATEST_TAG != env.NEXT_TAG && github.event.inputs.skip-commit != 'true' uses: ad-m/github-push-action@master with: github_token: ${{ secrets.SELENIUM_CI_TOKEN }} branch: trunk - name: Create release notes (release_notes.md) run: ./generate_release_notes.sh ${LATEST_TAG} origin/trunk ${GRID_VERSION} ${BUILD_DATE} + - name: Upload release notes + uses: actions/upload-artifact@main + with: + name: release_notes + path: ./release_notes.md + if-no-files-found: ignore - name: Create Release + if: env.LATEST_TAG != env.NEXT_TAG && github.event.inputs.skip-commit != 'true' id: create_release uses: softprops/action-gh-release@master with: diff --git a/Makefile b/Makefile index 4c9519776..934921e5a 100644 --- a/Makefile +++ b/Makefile @@ -238,7 +238,7 @@ edge_upgrade_version: # https://github.com/SeleniumHQ/docker-selenium/issues/992 # Additional tags for browser images -tag_and_push_browser_images: tag_and_push_chrome_images tag_and_push_firefox_images tag_and_push_edge_images +tag_and_push_browser_images: tag_and_push_chrome_images tag_and_push_chromium_images tag_and_push_firefox_images tag_and_push_edge_images tag_and_push_chrome_images: ./tag_and_push_browser_images.sh $(VERSION) $(BUILD_DATE) $(NAMESPACE) $(PUSH_IMAGE) chrome diff --git a/generate_release_notes.sh b/generate_release_notes.sh index d8966537f..f531b6a59 100755 --- a/generate_release_notes.sh +++ b/generate_release_notes.sh @@ -21,7 +21,7 @@ EDGEDRIVER_VERSION=$(docker run --rm ${NAMESPACE}/node-edge:${TAG_VERSION} msedg FIREFOX_VERSION=$(docker run --rm ${NAMESPACE}/node-firefox:${TAG_VERSION} firefox --version | awk '{print $3}') GECKODRIVER_VERSION=$(docker run --rm ${NAMESPACE}/node-firefox:${TAG_VERSION} geckodriver --version | awk 'NR==1{print $2}') FFMPEG_VERSION=$(docker run --entrypoint="" --rm ${NAMESPACE}/video:${FFMPEG_TAG_VERSION}-${BUILD_DATE} ffmpeg -version | awk '{print $3}' | head -n 1) -RCLONE_VERSION=$(docker run --entrypoint="" --rm ${NAMESPACE}/video:${FFMPEG_TAG_VERSION}-${BUILD_DATE} rclone version | head -n 1 | awk '{print $2}') | tr -d 'v' +RCLONE_VERSION=$(docker run --entrypoint="" --rm ${NAMESPACE}/video:${FFMPEG_TAG_VERSION}-${BUILD_DATE} rclone version | head -n 1 | awk '{print $2}' | tr -d 'v') JRE_VERSION=$(docker run --entrypoint="" --rm ${NAMESPACE}/base:${TAG_VERSION} java --version | grep -oP '\b\d+\.\d+\.\d+\b' | head -1) FIREFOX_ARM64_VERSION=$(docker run --rm --platform linux/arm64 ${NAMESPACE}/node-firefox:${TAG_VERSION} firefox --version | awk '{print $3}') CHROMIUM_VERSION=$(docker run --rm ${NAMESPACE}/node-chromium:${TAG_VERSION} chromium --version | awk '{print $2}') diff --git a/update_tag_in_docs_and_files.sh b/update_tag_in_docs_and_files.sh index 48fdd1233..bc8cc7471 100755 --- a/update_tag_in_docs_and_files.sh +++ b/update_tag_in_docs_and_files.sh @@ -52,7 +52,7 @@ if [ "$latest_chart_app_version" == $LATEST_TAG ] && [ "$latest_chart_app_versio echo -e "\033[0;32m NEXT_CHART_VERSION -> ${next_chart_version}\033[0m" # If you want to test this locally and you are using macOS, do `brew install gnu-sed` and change `sed` for `gsed`. find . \( -type d -name .git -prune \) -o -type f -wholename '*/selenium-grid/Chart.yaml' -print0 | xargs -0 sed -i "s/${latest_chart_version}/${next_chart_version}/g" - find . \( -type d -name .git -prune \) -o -type f -name 'bug_report.yaml' -print0 | xargs -0 sed -i "s/${latest_chart_version}/${next_chart_version}/g" + find . \( -type d -name .git -prune \) -o -type f -wholename '*/bug_report.yml' -print0 | xargs -0 sed -i "s/${latest_chart_version}/${next_chart_version}/g" fi git diff | cat