15
15
required : false
16
16
type : string
17
17
default : ' false'
18
+ skip-test :
19
+ description : ' Skip the tests'
20
+ required : false
21
+ type : boolean
22
+ default : false
23
+ skip-commit :
24
+ description : ' Skip the commit'
25
+ required : false
26
+ type : boolean
27
+ default : false
28
+
29
+ permissions : write-all
18
30
19
31
jobs :
20
32
helm-chart-test :
33
+ if : github.event.inputs.skip-test != 'true'
21
34
uses : ./.github/workflows/helm-chart-test.yml
22
35
with :
23
36
release : ${{ github.event.inputs.release == 'true' }}
24
37
25
38
release :
26
39
needs :
27
40
- helm-chart-test
41
+ if : (!failure() && !cancelled())
28
42
runs-on : ubuntu-latest
29
43
permissions : write-all
44
+ env :
45
+ NAME : ${{ vars.DOCKER_NAMESPACE || 'selenium' }}
30
46
steps :
31
47
- name : Checkout
32
48
uses : actions/checkout@main
33
49
with :
34
50
persist-credentials : false
35
51
fetch-depth : 0
52
+ - name : Set up environment for building chart
53
+ uses : nick-invision/retry@master
54
+ with :
55
+ timeout_minutes : 10
56
+ max_attempts : 3
57
+ command : make chart_setup_env
58
+ - name : Build Helm chart
59
+ uses : nick-invision/retry@master
60
+ with :
61
+ timeout_minutes : 5
62
+ max_attempts : 3
63
+ retry_wait_seconds : 10
64
+ command : |
65
+ SET_VERSION=false make chart_build
66
+ echo "CHART_PACKAGE_PATH=$(cat /tmp/selenium_chart_version)" >> $GITHUB_ENV
67
+ echo "CHART_FILE_NAME=$(basename $(cat /tmp/selenium_chart_version))" >> $GITHUB_ENV
36
68
37
69
- name : Configure Git
38
70
run : |
42
74
- name : Get chart release notes (chart_release_notes.md)
43
75
run : ./generate_chart_changelog.sh
44
76
77
+ - name : Login Docker Hub
78
+ run : helm registry login registry-1.docker.io -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
79
+ env :
80
+ DOCKER_USERNAME : ${{secrets.DOCKER_USERNAME}}
81
+ DOCKER_PASSWORD : ${{secrets.DOCKER_PASSWORD}}
82
+
83
+ - name : Push Helm chart to registry
84
+ uses : nick-invision/retry@master
85
+ with :
86
+ timeout_minutes : 20
87
+ max_attempts : 3
88
+ retry_wait_seconds : 120
89
+ command : make chart_release
90
+
45
91
- name : Run chart-releaser
46
92
uses : helm/chart-releaser-action@main
47
93
with :
@@ -52,13 +98,15 @@ jobs:
52
98
CR_RELEASE_NOTES_FILE : RELEASE_NOTES.md
53
99
54
100
- name : Commit files
101
+ if : github.event.inputs.skip-commit != 'true'
55
102
run : |
56
103
git config --local user.email "[email protected] "
57
104
git config --local user.name "Selenium CI Bot"
58
105
git commit -m "Update tag in docs and files" -a || true
59
106
60
107
- name : Push changes
108
+ if : github.event.inputs.skip-commit != 'true'
61
109
uses : ad-m/github-push-action@master
62
110
with :
63
- github_token : ${{ secrets.SELENIUM_CI_TOKEN }}
111
+ github_token : ${{ secrets.SELENIUM_CI_TOKEN || secrets.GITHUB_TOKEN }}
64
112
branch : trunk
0 commit comments