Skip to content

Consider not requiring SVN credentials for dry-run #149

Closed
@aaemnnosttv

Description

@aaemnnosttv

Currently the SVN credentials are required for all runs, however they're only used when performing the commit which is only conditionally called if the job is not running as a dry-run.

if [[ -z "$SVN_USERNAME" ]]; then
echo "Set the SVN_USERNAME secret"
exit 1
fi
if [[ -z "$SVN_PASSWORD" ]]; then
echo "Set the SVN_PASSWORD secret"
exit 1
fi

if $INPUT_DRY_RUN; then
echo "➤ Dry run: Files not committed."
else
echo "➤ Committing files..."
svn commit -m "Update to version $VERSION from GitHub" --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
fi

The dry-run was a much more recent addition, so it's possible this wasn't considered at the time.

Describe the solution you'd like

Since the credentials are only needed for that part of the deploy which isn't called for a dry-run, it would be nice to not require them but only in this scenario. Instead, I propose that missing credentials only raise a warning in a dry-run (to ensure devs are still aware without failing the script) but are still required for normal runs. This would add a little peace of mind to dry-runs that a deployment could not be possible (even if there was a bug in the action's script).

Similarly, it could be worth even redefining/unsetting the SVN credential variables when running as a dry-run early on to further safeguard these runs when live credentials may be present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededneeds:engineeringThis requires engineering to resolve.

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions