mirror of
https://github.com/rustfs/rustfs.git
synced 2026-10-03 20:20:29 +00:00
ci(helm): sync README to root of helm repository on release (#8263)
Include helm/rustfs/README.md in the uploaded helm-package artifact so publish-helm-package updates the root README.md in rustfs/helm. The build-helm-package job copies helm/README.md into helm/rustfs/ before running helm package, but upload-artifact previously uploaded only helm/rustfs/*.tgz. Because both files share the helm/rustfs/ parent directory, actions/upload-artifact places both the chart archive and README.md at the artifact root, and download-artifact extracts README.md into the root of rustfs/helm alongside the tarball.
This commit is contained in:
@@ -145,7 +145,9 @@ jobs:
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: helm-package
|
||||
path: helm/rustfs/*.tgz
|
||||
path: |
|
||||
helm/rustfs/*.tgz
|
||||
helm/rustfs/README.md
|
||||
retention-days: 1
|
||||
|
||||
publish-helm-package:
|
||||
|
||||
@@ -113,6 +113,23 @@ sleep() {
|
||||
self.assertLess(gate, package)
|
||||
self.assertNotIn("continue-on-error", workflow[gate:package])
|
||||
|
||||
def test_upload_artifact_includes_chart_and_readme(self):
|
||||
workflow = WORKFLOW.read_text()
|
||||
copy_readme = workflow.index("cp helm/README.md helm/rustfs/")
|
||||
upload = workflow.index(" - name: Upload helm package as artifact")
|
||||
self.assertLess(copy_readme, upload)
|
||||
|
||||
publish = workflow.index(" publish-helm-package:", upload)
|
||||
upload_step = workflow[upload:publish]
|
||||
expected_path = "path: |\n helm/rustfs/*.tgz\n helm/rustfs/README.md\n"
|
||||
self.assertIn(expected_path, upload_step)
|
||||
|
||||
download = workflow.index(" - name: Download helm package", publish)
|
||||
push_step = workflow.index(" - name: Push helm package and index file", download)
|
||||
download_step = workflow[download:push_step]
|
||||
self.assertIn("name: helm-package", download_step)
|
||||
self.assertIn("path: ./", download_step)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user