Skip to content

Update tag 4.25.0-20241010 in docs and files #145

Update tag 4.25.0-20241010 in docs and files

Update tag 4.25.0-20241010 in docs and files #145

name: Release Charts
concurrency:
group: ${{ github.workflow }}
on:
push:
branches:
- trunk
paths:
- 'charts/selenium-grid/Chart.yaml'
workflow_dispatch:
inputs:
release:
description: 'Deploy a new release'
required: false
type: string
default: 'false'
skip-test:
description: 'Skip the tests'
required: false
type: boolean
default: false
skip-commit:
description: 'Skip the commit'
required: false
type: boolean
default: false
permissions: write-all
jobs:
helm-chart-test:
if: github.event.inputs.skip-test != 'true'
uses: ./.github/workflows/helm-chart-test.yml
with:
release: ${{ github.event.inputs.release == 'true' }}
release:
needs:
- helm-chart-test
if: (!failure() && !cancelled())
runs-on: ubuntu-latest
permissions: write-all
env:
NAME: ${{ vars.DOCKER_NAMESPACE || 'selenium' }}
steps:
- name: Checkout
uses: actions/checkout@main
with:
persist-credentials: false
fetch-depth: 0
- name: Set up environment for building chart
uses: nick-invision/retry@master
with:
timeout_minutes: 10
max_attempts: 3
command: make setup_dev_env
- name: Build Helm chart
uses: nick-invision/retry@master
with:
timeout_minutes: 5
max_attempts: 3
retry_wait_seconds: 10
command: |
SET_VERSION=false make chart_build
echo "CHART_PACKAGE_PATH=$(cat /tmp/selenium_chart_version)" >> $GITHUB_ENV
echo "CHART_FILE_NAME=$(basename $(cat /tmp/selenium_chart_version))" >> $GITHUB_ENV
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Get chart release notes (chart_release_notes.md)
run: |
./generate_chart_changelog.sh
echo "IS_RELEASE=$(cat /tmp/selenium_chart_release)" >> $GITHUB_ENV
- name: Login Docker Hub
run: helm registry login registry-1.docker.io -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
- name: Push Helm chart to registry
uses: nick-invision/retry@master
with:
timeout_minutes: 20
max_attempts: 3
retry_wait_seconds: 120
command: |
make chart_release
echo "LATEST_CHART_VERSION=$(cat /tmp/latest_chart_version)" >> $GITHUB_ENV
- name: Run chart-releaser
if: env.IS_RELEASE == 'true'
uses: helm/chart-releaser-action@main
with:
mark_as_latest: false
skip_existing: false
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_RELEASE_NOTES_FILE: RELEASE_NOTES.md
- name: Commit files
if: github.event.inputs.skip-commit != 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "Selenium CI Bot"
git commit -m "Update chart ${LATEST_CHART_VERSION} changelog [skip ci]" -a || true
- name: Push changes
if: github.event.inputs.skip-commit != 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.SELENIUM_CI_TOKEN || secrets.GITHUB_TOKEN }}
branch: trunk