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

v0.6.2 fails when trying to run entrypoint.sh #50

Closed
hgaiser opened this issue Apr 15, 2024 · 9 comments
Closed

v0.6.2 fails when trying to run entrypoint.sh #50

hgaiser opened this issue Apr 15, 2024 · 9 comments

Comments

@hgaiser
Copy link

hgaiser commented Apr 15, 2024

When using cloudsmith-io/[email protected] I get the following error:

bash: /home/runner/work/_actions/cloudsmith-io/action/v0.6.2/entrypoint.sh: No such file or directory

Running cloudsmith-io/[email protected] does work however.

I noticed the following release message:

The previous release of the GitHub action made some changes to how the action runs, and this had inadvertently broken things where invoked from other workflows. Apologies for the inconvenience!

However I assume this didn't quite work.

@hgaiser hgaiser changed the title Running v0.6.2 version fails when trying to run entrypoint.sh v0.6.2 fails when trying to run entrypoint.sh Apr 15, 2024
@BartoszBlizniak
Copy link

Hey @hgaiser thank you for reporting this. May I know if you're using a custom Github runner or is it default? The change that you have linked checks for the ${{ github.action_path }} which is a Github default variable to which the contents of the action are being downloaded to.

@hgaiser
Copy link
Author

hgaiser commented Apr 15, 2024

Hey @BartoszBlizniak , thanks for the quick reply :). I am using runs-on: ubuntu-latest. Do you know if I can check the value of that variable somewhere?

@BartoszBlizniak
Copy link

Hey @BartoszBlizniak , thanks for the quick reply :). I am using runs-on: ubuntu-latest. Do you know if I can check the value of that variable somewhere?

The best approach would be to echo the path back. The original documentation can be found here.

In your case it should be under: /home/runner/work/_actions/cloudsmith-io/action/v0.6.2/

@BartoszBlizniak
Copy link

Hey @hgaiser - just wanted to check if you're consistently facing this issue? I wasn't able to replicate the behaviour using ubuntu-latest.

Perhaps if you can share your workflow I could take a look at replicating the issue with that.

@hgaiser
Copy link
Author

hgaiser commented Apr 16, 2024

I was getting the same error in two different repositories. The workflow is as follows:

name: Package

on:
  push:
    tags: [ '[0-9]+.[0-9]+.[0-9]+*' ]

jobs:
  package :
    runs-on: ubuntu-latest

    container:
      image: python:3.9-buster

    steps:
      - name: Setup Git Credentials
        uses: fusion-engineering/setup-git-credentials@v2
        with:
          credentials: ${{secrets.CI_GIT_CREDENTIALS}}

      - name: Checkout git
        uses: actions/checkout@v2
        with:
          token: ${{ secrets.CI_PAT }}

      - name: Publish
        uses: cloudsmith-io/action@master
        with:
          api-key: ${{ secrets.CLOUDSMITH_PYTHON_TOKEN }}
          command: push
          format: python
          owner: rocsys
          repo: python
          republish: true
          file: dist/*

I removed some actions related to Poetry, I don't think they are relevant for this issue.

I didn't output the variable yet. Do you still think it's relevant?

@BartoszBlizniak
Copy link

Thank you @hgaiser - I was able to replicate the issue. It appears that this part of the code breaks the deployment:

    container:
      image: python:3.9-buster

I will have to investigate as to why it's doing that. Removing that line should still work and download the necessary python dependencies.

@hgaiser
Copy link
Author

hgaiser commented Apr 17, 2024

Thanks for looking into this, happy to hear you could replicate the issue :).

@BartoszBlizniak
Copy link

Hey @hgaiser - the "breaking" change was actually implemented as step to remove the need of having a docker container being pulled to setup the Cloudsmith GHA, we use "composite" instead of "docker". I think the correct way forward for time being would be to remove the container flag in general and use the defaults. I tried to dig around and play around with the code to get this work within a container but no luck.

I've also stumbled across this Github Issue thread that to this day hasn't been properly addressed and it looks like it's contributing to the issue that we are seeing around this.

@hgaiser
Copy link
Author

hgaiser commented Apr 26, 2024

Hmm but does that mean this action will be incompatible when using a container? For this specific workflow that's probably not an issue, but what about workflows where a container is required?

For example for a project I'm running I require to compile in an Arch Linux environment. I use a docker container for that purpose. Does it mean that I can't use this action for that workflow?

If so, I think the issue should remain open (with maybe a changed title) until this is resolved. Let me know what you think 👍

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

No branches or pull requests

2 participants