sparse-intern-71089
11/22/2021, 5:48 PMfancy-gpu-82886
12/27/2021, 9:49 AMfancy-gpu-82886
12/29/2021, 8:40 AMdef 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))
)No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by