skills/deploy-to-azure

Pull-Main.sh missing [Bug]

Closed this issue · 5 comments

Describe the bug
This script is missing and fails the action run.

For context, this is needed for the 2-setup-azure-environments.yml, 3-spinup-environment.yml and 4-deploy-to-staging-environment.yml workflows.

https://github.com/skills/continuous-delivery-azure/blob/045a9a6c934b71601f9e97a4081d15d7e1cef426/.github/workflows/2-setup-azure-environment.yml#L80-L84

pull-main.sh doesn't exist in the repo. I assume it was meant to be added in commit 413602c (in PR #36 ) but was missed off git add by mistake.

The fix is to change that to ./.github/script/initialize-repository.sh

@gsacavdm I don't think ./.github/script/initialize-repository.sh is the right script to run. initialize-repository.sh is written for linking branch histories after repo creation. It does this by merging main into all branches.

Looking at the context for pull-main.sh, it looks like it is meant to pull and checkout main so that the next action can update the steps in the README. (Otherwise the steps won't get updated on main but on the feature branch instead.) initialize-repository.sh doesn't do this.

edit:
I'm not sure pull-main.sh is even needed though as the skills/action-update-step action includes checking out main. The previous step merges staging-workflow into main via the PR, so yes, we need to re-pull that merge commit onto the runner before running skills/action-update-step and creating the step update commit.

Fixed in #51 with pull-main.sh renamed to initialize-repository.sh, and given exec permission. See:

https://github.com/skills/deploy-to-azure/blob/main/.github/workflows/2-setup-azure-environment.yml#L108-L114

Thanks for following up, @rffontenelle