deploy-to-azure icon indicating copy to clipboard operation
deploy-to-azure copied to clipboard

Pull-Main.sh missing [Bug]

Open kingso opened this issue 2 years ago • 4 comments

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

kingso avatar Feb 24 '23 10:02 kingso

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 413602c4 (in PR #36 ) but was missed off git add by mistake.

markpatterson27 avatar Feb 26 '23 08:02 markpatterson27

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

gsacavdm avatar Mar 02 '23 05:03 gsacavdm

@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.

markpatterson27 avatar Mar 02 '23 08:03 markpatterson27

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

rffontenelle avatar Mar 19 '24 19:03 rffontenelle

Thanks for following up, @rffontenelle

hectorsector avatar May 22 '24 14:05 hectorsector