This message was deleted.
# azure
s
This message was deleted.
f
@faint-tiger-16075 did you find a way to do this? I’m attempting to do the same, but can’t really fine a good way to do this.
For anyone stumbling upon this in the future, here is how I solved this:
Copy code
def create_publish_profile(publish_profile: ListWebAppPublishingCredentialsResult, app_url: str) -> str:
    publish_url = publish_profile.scm_uri.split("@")[-1] + ":443"
    user_name = publish_profile.publishing_user_name
    user_pwd = publish_profile.publishing_password
    destination_app_url = "https://" + app_url

    publish_profile_string = f"""<publishData>
    <publishProfile
        publishUrl="{publish_url}"
        userName="{user_name}"
        userPWD="{user_pwd}"
        destinationAppUrl="{destination_app_url}"
    >
    </publishProfile>
</publishData>"""

    return publish_profile_string

app_publish_credentials = web.list_web_app_publishing_credentials_output(
    name=app.name,
    resource_group_name=resource_group.name
)

gh.ActionsSecret("github-publish-profile",
    secret_name="AZURE_WEBAPP_PUBLISH_PROFILE",
    repository=config.get("repo-name"),
    plaintext_value=pulumi.Output.all(
        app_publish_credentials,
        app.default_host_name,
    ).apply(lambda args: create_publish_profile(*args))
)