22 lines
482 B
Bash
Executable File
22 lines
482 B
Bash
Executable File
#!/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 $INPUT_PYPI_REPO_DOMAIN
|
|
|
|
echo "$config_output" > "$HOME/.pypirc"
|
|
cat "$HOME/.pypirc" |