55# Copyright 2025 The Linux Foundation
66
77name : Publish image and tag/release code
8+ # Calling workflow should include "secrets: inherit"
89
910# yamllint disable-line rule:truthy
1011on :
1112 workflow_call :
1213 inputs :
13- CHARTS_REPO_URL :
14- description : " Repo URL to push charts to"
14+ charts_repo_url :
15+ description : " URL for the helm repository to push to"
1516 required : false
1617 type : string
17- UMBRELLA_CHART :
18- description : " The repository's umbrella chart, if applicable"
19- required : false
20- type : string
21- RSYNC_REMOTE_HOST :
22- description : " The remote host to sync charts to"
23- required : false
18+ default : https://charts.aetherproject.org
19+ remote_host :
20+ description : " Address for host to sync charts to"
21+ required : true
2422 type : string
25- RSYNC_REMOTE_PATH :
26- description : " The path on the remote host to sync charts to "
27- required : false
23+ remote_path :
24+ description : " Path on remote_host where charts should be stored "
25+ required : true
2826 type : string
2927
3028jobs :
8179 version : ${{ steps.version-change.outputs.version }}
8280
8381 version-check :
84- runs-on : ubuntu-latest
85- steps :
86- - uses : actions/checkout@v4
87- with :
88- fetch-depth : 0
89- - name : Setup yq
90- uses : vegardit/gha-setup-yq@v1
91- - name : Check all changed charts have unique versions
92- id : version-change
93- run : |
94- export COMPARISON_BRANCH=${{ github.event.before }}
95- ${{ github.action_path }}/version_check.sh check_unique
82+ uses : onosproject/.github/.github/workflows/version-check.yml@main
9683
9784 tag-versions :
9885 runs-on : ubuntu-latest
@@ -138,7 +125,6 @@ jobs:
138125 - name : Publish all changed charts
139126 # yamllint disable rule:line-length
140127 run : |
141- export COMPARISON_BRANCH=${{ github.event.before }}
142128 target_charts=${{ steps.get-charts.outputs.charts }}
143129 rm -rf staging && mkdir -p staging/${{ github.repository }}
144130 while IFS= read -r tc
@@ -148,8 +134,8 @@ jobs:
148134 helm package $tc --destination staging/${{ github.repository }}/$tc
149135 done <<< $target_charts
150136 cd staging
151- curl -o current-index.yaml ${{ inputs.CHARTS_REPO_URL }}/index.yaml
152- helm repo index ${{ github.repository }} --url ${{ inputs.CHARTS_REPO_URL }}/${{ github.repository }} --merge current-index.yaml
137+ curl -o current-index.yaml ${{ inputs.charts_repo_url }}/index.yaml
138+ helm repo index ${{ github.repository }} --url ${{ inputs.charts_repo_url }}/${{ github.repository }} --merge current-index.yaml
153139 rm -rf current-index.yaml
154140 mv ${{ github.repository }}/index.yaml .
155141 cd ..
@@ -160,8 +146,8 @@ jobs:
160146 with :
161147 switches : -rvzh
162148 path : staging/
163- remote_path : ${{ inputs.RSYNC_REMOTE_PATH }}
164- remote_host : ${{ inputs.RSYNC_REMOTE_HOST }}
149+ remote_path : ${{ inputs.remote_path }}
150+ remote_host : ${{ inputs.remote_host }}
165151 remote_user : ${{ secrets.JENKINS_USERNAME }}
166152 remote_key : ${{ secrets.JENKINS_SSHKEY }}
167153 remote_key_pass : ${{ secrets.JENKINS_PASSPHRASE }}
0 commit comments