#!/bin/bash config_template=' [distutils] index-servers = repo [repo] repository = {repository} username = {username} password = {password} ' # Replace placeholders with environment variables config_output=$(echo "$config_template" | \ sed -e "s/{repository}/$INPUT_PYPI_REPO_DOMAIN/g" \ -e "s/{username}/$INPUT_PYPI_REPO_USER/g" \ -e "s/{password}/$INPUT_PYPI_REPO_PASS/g") echo "$config_output" > "$HOME/.pypirc"