-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chart(release): Update workflow for OCI-based registry publish
Signed-off-by: Viet Nguyen Duc <[email protected]>
- Loading branch information
Showing
3 changed files
with
51 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,24 +15,56 @@ on: | |
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 chart_setup_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: | | ||
|
@@ -42,6 +74,20 @@ jobs: | |
- name: Get chart release notes (chart_release_notes.md) | ||
run: ./generate_chart_changelog.sh | ||
|
||
- 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 | ||
|
||
- name: Run chart-releaser | ||
uses: helm/chart-releaser-action@main | ||
with: | ||
|
@@ -52,13 +98,15 @@ jobs: | |
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 tag in docs and files" -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 }} | ||
github_token: ${{ secrets.SELENIUM_CI_TOKEN || secrets.GITHUB_TOKEN }} | ||
branch: trunk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,4 @@ | |
*.tmproj | ||
.vscode/ | ||
ci/ | ||
certs/*-helper.sh | ||
certs/add-*-helper.sh |