Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull-Main.sh missing [Bug] #38

Closed
kingso opened this issue Feb 24, 2023 · 5 comments
Closed

Pull-Main.sh missing [Bug] #38

kingso opened this issue Feb 24, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@kingso
Copy link

kingso commented Feb 24, 2023

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

@kingso kingso added the bug Something isn't working label Feb 24, 2023
@markpatterson27
Copy link
Contributor

markpatterson27 commented Feb 26, 2023

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.

@gsacavdm
Copy link

gsacavdm commented Mar 2, 2023

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

@markpatterson27
Copy link
Contributor

markpatterson27 commented Mar 2, 2023

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

@rffontenelle
Copy link
Contributor

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

@hectorsector
Copy link
Contributor

Thanks for following up, @rffontenelle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants