fromhera.workflowsimport(Container,GCSArtifact,Workflow,modelsasm,)withWorkflow(generate_name="output-artifact-gcs-",entrypoint="hello-world-to-file")asw:Container(name="hello-world-to-file",image="busybox",command=["sh","-c"],args=["echo hello world | tee /tmp/hello_world.txt"],outputs=[GCSArtifact(name="message",path="/tmp",bucket="my-bucket",key="path/in/bucket/hello_world.txt.tgz",service_account_key_secret=m.SecretKeySelector(name="my-gcs-credentials",key="serviceAccountKey"),)],)
apiVersion:argoproj.io/v1alpha1kind:Workflowmetadata:generateName:output-artifact-gcs-spec:entrypoint:hello-world-to-filetemplates:-name:hello-world-to-filecontainer:image:busyboxargs:-echo hello world | tee /tmp/hello_world.txtcommand:-sh--coutputs:artifacts:-name:messagepath:/tmpgcs:bucket:my-bucketkey:path/in/bucket/hello_world.txt.tgzserviceAccountKeySecret:name:my-gcs-credentialskey:serviceAccountKey