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

release-libraries causes weird error when used in reusable workflows #82

Closed
jdkandersson opened this issue Jan 24, 2023 · 1 comment
Closed
Labels
Status: Triage Type: Bug Something isn't working

Comments

@jdkandersson
Copy link

Bug Description

We recently added the canonical/charming-actions/release-libraries action to our reusable workflows and have isolated an issue we are seeing to the inclusion of this action in the reusable workflow. With this job:

  release-charm-libs:
    name: Release charm libs
    uses: canonical/charming-actions/release-libraries@2.2.2
    needs: [ lib-check, tests, integration-tests ]
    with:
      credentials: ${{ secrets.CHARMHUB_TOKEN }}
      github-token: ${{ secrets.GITHUB_TOKEN }}

To https://github.com/canonical/operator-workflows/blob/main/.github/workflows/test_and_publish_charm.yaml (lines 90-96), we get the following failure:

[Invalid workflow file: .github/workflows/test_and_publish_charm.yaml#L19](https://github.com/canonical/indico-operator/actions/runs/4000676362/workflow)
error parsing called workflow
".github/workflows/test_and_publish_charm.yaml"
-> "canonical/operator-workflows/.github/workflows/test_and_publish_charm.yaml@main" (source branch with sha:a914f5ce827f00cc5e314b2d54ff9227a79c95ff)
: invalid value workflow reference: references to workflows must be rooted in '.github/workflows'

Without it, the workflow runs fine. Obviously the above error is a red herring, I'm not sure what is causing the problem. Do you have any ideas?

To Reproduce

Add:

  release-charm-libs:
    name: Release charm libs
    uses: canonical/charming-actions/release-libraries@2.2.2
    needs: [ lib-check, tests, integration-tests ]
    with:
      credentials: ${{ secrets.CHARMHUB_TOKEN }}
      github-token: ${{ secrets.GITHUB_TOKEN }}

To a reusable workflow and call it from a repository

Environment

This is running on GitHub actions

Relevant log output

[Invalid workflow file: .github/workflows/test_and_publish_charm.yaml#L19](https://github.com/canonical/indico-operator/actions/runs/4000676362/workflow)
error parsing called workflow
".github/workflows/test_and_publish_charm.yaml"
-> "canonical/operator-workflows/.github/workflows/test_and_publish_charm.yaml@main" (source branch with sha:a914f5ce827f00cc5e314b2d54ff9227a79c95ff)
: invalid value workflow reference: references to workflows must be rooted in '.github/workflows'


### Additional context

_No response_
@arturo-seijas
Copy link

I think you can close this issue. It was a pipeline problem. GitHub is interpreting the file appropriately now https://github.com/canonical/indico-operator/actions/runs/4005455192

@simskij simskij closed this as completed Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants