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

upload-artifact in other action's action.yml isn't run #2425

Open
davetapley opened this issue Aug 17, 2024 · 0 comments
Open

upload-artifact in other action's action.yml isn't run #2425

davetapley opened this issue Aug 17, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@davetapley
Copy link
Contributor

davetapley commented Aug 17, 2024

Bug report info

act version:            0.2.65
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        /var/run/docker.sock
Config files:           
        /home/codespace/.config/act/actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-22.04=catthehacker/ubuntu:act-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
        Go version:            go1.21.12
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:         
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.65 -X main.commit=bda491e406db6c85865498ced18764bc00491a5e -X main.date=2024-08-01T02:22:32Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 linux
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         bda491e406db6c85865498ced18764bc00491a5e
                vcs.time:             2024-08-01T02:22:10Z
                vcs.modified:         false
Docker Engine:
        Engine version:        27.0.3-1
        Engine runtime:        runc
        Cgroup version:        2
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Ubuntu 20.04.6 LTS (containerized)
        OS type:               linux
        OS version:            20.04
        OS arch:               x86_64
        OS kernel:             6.5.0-1022-azure
        OS CPU:                16
        OS memory:             64290 MB
        Security options:
                name=apparmor
                name=seccomp,profile=builtin
                name=cgroupns

Command used with act

act --artifact-server-path=/tmp/artifacts -W repro.yml

Describe issue

--artifact-server-path works fine with an explicit actions/upload-artifact@v4,
but in another action's action.yml it does not.

Link to GitHub repository

No response

Workflow content

name: build

on: [push]

jobs:
  build:
    runs-on: ubuntu-20.04
    steps:
      - id: checkout
        uses: actions/checkout@v2

      - id: test-upload
        uses: actions/upload-artifact@v4
        with:
          path: test.py

      - uses: sayyid5416/pyinstaller@v1
        with:
          spec: 'test.py'
          clean_checkout: false
          upload_exe_with_name: 'test'
          python_ver: '3.12.2'
          options: --onefile

Relevant log output

build/build]   💬  ::debug::File:/workspaces/ng/test.py was found using the provided searchPath
| With the provided path, there will be 1 file uploaded
[build/build]   💬  ::debug::Root artifact directory is /workspaces/ng
| Artifact name is valid!
| Root directory input is valid!
[build/build]   💬  ::debug::Workflow Run Backend ID: 1
[build/build]   💬  ::debug::Workflow Job Run Backend ID: 1
[build/build]   💬  ::debug::[Request] CreateArtifact http://10.0.0.154:34567/twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact
[build/build]   💬  ::debug::[Response] - 200
[build/build]   💬  ::debug::Headers: {%0A  "content-type": "application/json;charset=utf-8",%0A  "date": "Sat, 17 Aug 2024 20:46:10 GMT",%0A  "content-length": "256",%0A  "connection": "close"%0A}
[build/build]   💬  ::debug::Body: {%0A  "ok": true,%0A  "signedUploadUrl": "http://10.0.0.154:34567/twirp/github.actions.results.api.v1.ArtifactService/UploadArtifact?sig=lgAs1UUT7MlpaTtwRHt-0zvPGo5dojtwPdnpgGTyoxg=&expires=2024-08-17+21%253A46%253A10.423259371+%252B0000+UTC&artifactName=artifact&taskID=1"%0A}
[build/build]   💬  ::debug::Creating Artifact archive with compressionLevel: 6
[build/build]   💬  ::debug::Zip write high watermark value 8388608
[build/build]   💬  ::debug::Zip read high watermark value 8388608
[build/build]   💬  ::debug::Uploading artifact zip to blob storage with maxConcurrency: 256, bufferSize: 8388608
| Beginning upload of artifact content to blob storage
[build/build]   💬  ::debug::Zip stream for upload has ended.
[build/build]   💬  ::debug::Zip stream for upload has finished.
| Uploaded bytes 151
| Finished uploading artifact content to blob storage!
| SHA256 hash of uploaded artifact zip is 0535fc9481aaded3e65623d566b6441f571cac94520addb429db21d96c880faa
| Finalizing artifact upload
[build/build]   💬  ::debug::[Request] FinalizeArtifact http://10.0.0.154:34567/twirp/github.actions.results.api.v1.ArtifactService/FinalizeArtifact
[build/build]   💬  ::debug::[Response] - 200
[build/build]   💬  ::debug::Headers: {%0A  "content-type": "application/json;charset=utf-8",%0A  "date": "Sat, 17 Aug 2024 20:46:10 GMT",%0A  "content-length": "28",%0A  "connection": "close"%0A}
[build/build]   💬  ::debug::Body: {%0A  "ok": true,%0A  "artifactId": "1"%0A}
| Artifact artifact.zip successfully finalized. Artifact ID 1
| Artifact artifact has been successfully uploaded! Final size is 151 bytes. Artifact ID is 1
| Artifact download URL: https://github.com/JEFuller/ng/actions/runs/1/artifacts/1
[build/build]   ✅  Success - Main actions/upload-artifact@v4
[build/build]   ⚙  ::set-output:: artifact-id=1
[build/build]   ⚙  ::set-output:: artifact-url=https://github.com/JEFuller/ng/actions/runs/1/artifacts/1


[...]

| 13038 INFO: Building EXE from EXE-00.toc completed successfully.
[build/build]   ✅  Success - Main (Create) Executable
[build/build]   ⚙  ::set-output:: executable_path=./dist
[build/build]   ⚙  ::set-output:: is_uploaded=
[build/build]   ✅  Success - Main sayyid5416/pyinstaller@v1
[build/build] ⭐ Run Post sayyid5416/pyinstaller@v1
[build/build]   🐳  docker cp src=/home/codespace/.cache/act/sayyid5416-pyinstaller@v1/ dst=/var/run/act/actions/sayyid5416-pyinstaller@v1/
[build/build] ⭐ Run Post (Install) python
[build/build]   🐳  docker exec cmd=[/opt/acttoolcache/node/18.20.4/x64/bin/node /var/run/act/actions/actions-setup-python@v5/dist/cache-save/index.js] user= workdir=
[build/build]   ✅  Success - Post (Install) python
[build/build]   ✅  Success - Post sayyid5416/pyinstaller@v1
[build/build] Cleaning up container for job build
[build/build] 🏁  Job succeeded

Additional information

After running with act I can see test.py in the zip in /tmp/artifacts/1/artifact/,
but not the binary created by pyinstaller.

When run on Github Actions I see the binary in the run's assets:
Screen Shot 2024-08-17 at 2 15 25 PM

And the output continues to upload, instead of saying Success prematurely:

13640 INFO: Building EXE from EXE-00.toc completed successfully.
Run actions/upload-artifact@v4
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Beginning upload of artifact content to blob storage
Uploaded bytes 8388608
Uploaded bytes 16777216
Uploaded bytes 19949876
Finished uploading artifact content to blob storage!
SHA256 hash of uploaded artifact zip is XXXX
Finalizing artifact upload
Artifact test.zip successfully finalized. Artifact ID XXXX
Artifact test has been successfully uploaded! Final size is 19949876 bytes. Artifact ID is XXX
Artifact download URL: https://github.com/JEFuller/ng/actions/runs/XXXX/artifacts/XXXX
Run actions/upload-artifact@v4
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Beginning upload of artifact content to blob storage
Uploaded bytes 470
Finished uploading artifact content to blob storage!
SHA256 hash of uploaded artifact zip is XXXXX
Finalizing artifact upload
Artifact Generated spec file test.zip successfully finalized. Artifact ID XXX
Artifact Generated spec file test has been successfully uploaded! Final size is 470 bytes. Artifact ID is XXX
Artifact download URL: https://github.com/XXXXXX/actions/runs/XXX/artifacts/XXX
Run echo "✔️ Executable **_(test)_** uploaded successfully" >> $GITHUB_STEP_SUMMARY
@davetapley davetapley added the kind/bug Something isn't working label Aug 17, 2024
@davetapley davetapley changed the title upload-artifact in other action's action.yml doesn't copy to --artifact-server-path upload-artifact in other action's action.yml isn't run Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant