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

action.py: No such file or directory #71

Closed
Crowfunder opened this issue Aug 2, 2023 · 7 comments · Fixed by #72
Closed

action.py: No such file or directory #71

Crowfunder opened this issue Aug 2, 2023 · 7 comments · Fixed by #72
Assignees
Labels
bug Something isn't working

Comments

@Crowfunder
Copy link

Description

I keep getting an error using the most barebones configuration, I will skip to the part when the runner finishes installing all dependencies and tries to run the sigstore action.

Run D:\a\_actions\sigstore\gh-action-sigstore-python\v1.2.3/action.py "./build/test.dist/test.exe"
D:\a\_temp\4cbeed94-1ea6-46c1-a605-345eda4ef060.sh: line 1: D:a_actionssigstoregh-action-sigstore-pythonv1.2.3/action.py: No such file or directory
Error: Process completed with exit code 127.

Note: Isn't this D:a_actionssigstoregh-action-sigstore-pythonv1.2.3/action.py path kind of broken? I feel like it's missing a backslash or two. Maybe this action is not suitable for a windows runner?

I tested on this workflow.

name: Python application

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

permissions:
  contents: read
  id-token: write

jobs:

  build:
    # Windows is currently the only platform Nuitka action supports apparently?
    runs-on: windows-latest

    steps:

      # Check-out repository
      - uses: actions/checkout@v3

      # Setup Python
      - uses: actions/setup-python@v4
        with:
          python-version: '3.10' 
          architecture: 'x64' 

      - name: Compile to executable
        uses: Nuitka/Nuitka-Action@main
        with:
          nuitka-version: main
          script-name: test.py
          standalone: true
          onefile: false


      - name: Sign
        uses: sigstore/gh-action-sigstore-python@v1.2.3
        with:
          inputs: build/test.dist/test.exe 

      # Uploads artifact
      - name: Upload Artifact
        uses: actions/upload-artifact@v3
        with:
          name: Windows Build
          path: build/test.dist

Note: The input path seems to be correct, as removing the whole signing step uploads the artifact correctly.

Version

gh-action-sigstore-python@v1.2.3
windows-latest

@Crowfunder Crowfunder added the bug Something isn't working label Aug 2, 2023
@woodruffw
Copy link
Member

Thanks for the report @Crowfunder!

Yeah, this action has not received extensive testing on Windows. I'll look into this; as a temporary workaround, you can work around this by configuring a separate Linux job and using upload-artifact + download-artifact to shuttle whatever you'd like to sign over to it.

@woodruffw woodruffw self-assigned this Aug 2, 2023
@woodruffw
Copy link
Member

The problem probably boils down to this:

${{ github.action_path }}/action.py "${{ inputs.inputs }}"

We should probably be using ${GITHUB_ACTION_PATH} instead. I'll confirm that shortly.

Ref: https://github.com/orgs/community/discussions/25910

@woodruffw
Copy link
Member

#72 should fix things here -- ${GITHUB_ACTION_PATH} was necessary, along with some other fixes.

Thanks again for reporting this @Crowfunder!

@Crowfunder
Copy link
Author

Thanks for blazing fast response and fix @woodruffw!

I really appreciate it, if there's anything you need me to do, help with or test, I'm there!

@woodruffw
Copy link
Member

No problem, we appreciate these reports!

If you'd like to help test, you can try and run the action from the branch in that PR:

uses: sigstore/gh-action-sigstore-python@ww/windows-accomodations

@Crowfunder
Copy link
Author

I can confirm it works now! @woodruffw

@woodruffw
Copy link
Member

Excellent! Another maintainer will need to approve here, but once they do we'll merge and get a release made.

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

Successfully merging a pull request may close this issue.

2 participants