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

collection: Regression in GitHub workflows after merging PR 610 #621

Closed
berndfinger opened this issue Jan 25, 2024 · 13 comments
Closed

collection: Regression in GitHub workflows after merging PR 610 #621

berndfinger opened this issue Jan 25, 2024 · 13 comments
Assignees

Comments

@berndfinger
Copy link
Member

The error message is:

[Invalid workflow file: .github/workflows/ansible-lint-sap_maintain_etc_hosts.yml#L1](https://github.com/sap-linuxlab/community.sap_install/actions/runs/7651827742/workflow)
No steps defined in `steps` and no workflow called in `uses` for the following jobs: ansible-lint
@berndfinger
Copy link
Member Author

berndfinger commented Jan 25, 2024

After a first look, it seems that the steps: section is required. @Wabri - Can you please have a look?
Here's a link to one of the failing action: https://github.com/sap-linuxlab/community.sap_install/actions/runs/7652044239
And a direct link to the changed files of PR #610: https://github.com/sap-linuxlab/community.sap_install/pull/610/files

@berndfinger
Copy link
Member Author

The steps: section is however in .github/workflows/ansible-lint-sap_reusable_workflow.yml.

berndfinger added a commit to berndfinger/community.sap_install that referenced this issue Jan 25, 2024
berndfinger added a commit to berndfinger/community.sap_install that referenced this issue Jan 25, 2024
berndfinger added a commit to berndfinger/community.sap_install that referenced this issue Jan 25, 2024
berndfinger added a commit to berndfinger/community.sap_install that referenced this issue Jan 25, 2024
... for all roles.

Relates to: sap-linuxlab#621.

Signed-off-by: Bernd Finger <[email protected]>
berndfinger added a commit to berndfinger/community.sap_install that referenced this issue Jan 25, 2024
@ja9fuchs
Copy link
Contributor

Currently the reusable workflow file does not yet exist in the main branch.

That is probably the reason why the following

uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml**@main**

is not valid and causes an error.

I suggest merging this new reusable workflow file into main first in a separate PR.

@Wabri
Copy link
Member

Wabri commented Jan 25, 2024

Yes, I pointed it out this problem in this comment #610 (comment)

Maybe now we should try to run one of the action that went into that error and check if is ok

berndfinger added a commit to berndfinger/community.sap_install that referenced this issue Jan 26, 2024
@berndfinger
Copy link
Member Author

berndfinger commented Jan 26, 2024

Yes, I pointed it out this problem in this comment #610 (comment)

Thanks! I had read it but didn't pay enough attention to it.

Maybe now we should try to run one of the action that went into that error and check if is ok

The file is now part of the main branch. I created a test role with a GitHub reusable workflow, see https://github.com/berndfinger/testrole01/tree/dev/.github/workflows. None of my attempts to switch from a normal to a reusable workflow was successful so far.

@Wabri Can you please share an example of a configuration which has worked for you?

@berndfinger
Copy link
Member Author

Finally now working in my example, see https://github.com/berndfinger/testrole01/actions/runs/7667462910 .

@Wabri
Copy link
Member

Wabri commented Jan 26, 2024

Awesome 🚀

@berndfinger
Copy link
Member Author

berndfinger commented Jan 26, 2024

@Wabri Unfortunately, it only helped in my test case. Now working on:

  • trying to get the workflows to work in my fork. Maybe I can use a variable for the GitHub organization.
  • getting a little code change into dev, to verify that the workflows are actually working.
  • once that is done, implement the manual trigger for all workflows so that we can better test them.

From looking at https://github.com/Wabri/community.sap_install/actions, it seems the new reusable workflow hasn't worked for you. Are you still confident that it will work for this upstream repo?

berndfinger added a commit to berndfinger/community.sap_install that referenced this issue Jan 26, 2024
Solves issue sap-linuxlab#621
The workflows are now also watching a branch named
"github-workflow-test". If such a branch exists, a workflow will be
triggered if there is a change to a file of the role in this branch. Can
be useful for testing.

Signed-off-by: Bernd Finger <[email protected]>
@berndfinger
Copy link
Member Author

@Wabri Maybe I solved it, see PR #627 . I set you as one of the reviewers.

@Wabri
Copy link
Member

Wabri commented Jan 26, 2024

@Wabri
Copy link
Member

Wabri commented Jan 26, 2024

Saw the problem, I put too many layers in the jobs section!

@berndfinger
Copy link
Member Author

Hopefully solved by #627. Let's wait and see... :-)

@berndfinger berndfinger changed the title collection: Regression after merging PR 610 collection: Regression in GitHub workflows after merging PR 610 Feb 9, 2024
@Wabri Wabri self-assigned this Feb 12, 2024
@berndfinger
Copy link
Member Author

I think we can close this issue now. No more problems showed up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants