Giter Site home page Giter Site logo

Comments (17)

dawidd6 avatar dawidd6 commented on June 7, 2024

Link to repo?

from action-download-artifact.

shaypi avatar shaypi commented on June 7, 2024

@dawidd6 I wish I could, the repo is in a private enterprise account.
But I do found that if I add workflow_conclusion: failure it will take the artifact from the previous job that failed

which means that I need to understand with what flag to use in order of taking an on going workflow (I tried in progress and it didn't work)

Can be one of a workflow conclusion:

#   "failure", "success", "neutral", "cancelled", "skipped", "timed_out", "action_required"
# Or a workflow status:
#   "completed", "in_progress", "queued"

from action-download-artifact.

yaozhang09 avatar yaozhang09 commented on June 7, 2024

were you able to get it to work @shaypi i'm encountering the same problem

from action-download-artifact.

shaypi avatar shaypi commented on June 7, 2024

were you able to get it to work @shaypi i'm encountering the same problem

@yaozhang09 No, I didn't.
It look like the issue is not related to @dawidd6 workflow.
It seems that Reusable workflow uploads the artifacts at the end of the runtime, instead of during the runtime of the job.

from action-download-artifact.

Imeguras avatar Imeguras commented on June 7, 2024

Well i had a similar conclusion with my ci/cd pipeline

Here's the setup im using:
it all starts with a main,

name: main_wf
on:
  push: 
    branches: [ master, workflow-stuff ]
jobs:
  test-qt-desktop:
    uses: 
      ./.github/workflows/testQTdesktop_wf.yml
    secrets: inherit

which then flows to testQTdesktop

name: testQTdesktop_wf
on:
  workflow_call:
    inputs:
      suite: 
        required: false
        type: string
jobs: 
  build-qt-desktop:
    uses: ./.github/workflows/buildQmake_wf.yml
    with:
      qmakeflags: "CONFIG+=test"
      binaryfilename: VolanteAlphaQT_testes
  test-qt-desktop:
    needs: [build-qt-desktop]
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Fetch artifacts from build-qt-desktop
        uses: dawidd6/action-download-artifact@v2
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          workflow: ${{ github.event.workflow_run.workflow_id }}
          name: VolanteAlphaQT_testes
      - name: Run tests
        run: cd $GITHUB_WORKSPACE && ./VolanteAlphaQT -platform offscreen

in the middle a workflow is hit and produces an artifact

name: buildQmake_wf.yml
on: 
  workflow_call:
    inputs:
      qmakeflags:
        required: false
        type: string
      binaryfilename:
        required: true
        type: string      
jobs: 
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v3
    - uses: awalsh128/cache-apt-pkgs-action@latest
      with:
        packages: qt6-base-dev qt5-qmake qtbase5-dev libqt6serialport6 libqt6serialport6-dev libqt5serialport5 libqt5serialport5-dev nlohmann-json3-dev socat gengetopt
        version: 1.0
    - name: Build with qmake
      run: /usr/bin/qmake VolanteAlphaQT.pro ${{ inputs.qmakeflags }} && make
    - name: Upload artifact
      uses: actions/upload-artifact@v2
      with:
        name: ${{ inputs.binaryfilename }}
        path: ${{ github.workspace }}/bin/${{ inputs.binaryfilename }}
        if-no-files-found: error

The build step runs as it should producing an artifact with the name VolanteAlphaQT_testes the thing is the download part results in:

Run dawidd6/action-download-artifact@v2
  with:
    github_token: ***
    path: $GITHUB_WORKSPACE
    name: VolanteAlphaQT_testes
    workflow_conclusion: success
    repo: FSIPLEIRIA/volante_alpha_qt
    check_artifacts: false
    search_artifacts: false
    skip_unpack: false
    if_no_artifact_found: fail
==> Repository: FSIPLEIRIA/volante_alpha_qt
==> Artifact name: VolanteAlphaQT_testes
==> Local path: $GITHUB_WORKSPACE
==> Workflow name: 49617406
==> Workflow conclusion: success
==> (found) Run ID: 4285452593
==> (found) Run date: 2023-02-27T18:09:02Z
==> (not found) Artifact: VolanteAlphaQT_testes
==> Found the following artifacts instead:
Error: no artifacts found

Am i doing something wrong? Is this behaviour supported by this repo?

from action-download-artifact.

Imeguras avatar Imeguras commented on June 7, 2024

@dawidd6 moved the issue so you can erase the old one i guess

from action-download-artifact.

elalish avatar elalish commented on June 7, 2024

I just started running into this as well, oddly three hours ago it was working, but now (n=2) it is not. Here is where the failure message is, and here is the successful upload (under the "Upload WASM files" step).

from action-download-artifact.

Imeguras avatar Imeguras commented on June 7, 2024

No solutions yet? i guess ill just make a spaghetti script

from action-download-artifact.

elalish avatar elalish commented on June 7, 2024

The problem hasn't come up again for me, so I'm guessing it was some kind of Github outage.

from action-download-artifact.

shaypi avatar shaypi commented on June 7, 2024

@elalish what you showed up is not the same case scenario which I'm talking about

from action-download-artifact.

Imeguras avatar Imeguras commented on June 7, 2024

@lukasz-mitka solved my issue
Thank you!

from action-download-artifact.

lukasz-mitka avatar lukasz-mitka commented on June 7, 2024

@Imeguras how did I do that?

from action-download-artifact.

Imeguras avatar Imeguras commented on June 7, 2024

@Imeguras how did I do that?

Well sorry i thought you did the changes although you still reviewed it

from action-download-artifact.

jbrsb avatar jbrsb commented on June 7, 2024

Hello @shaypi, did you find a workaround? I'm facing the same issue despite it was working previously. Workflow A calling workflow B building/uploading artifacts then workflow C called by A try to download theses artefacts. Was working with workflow_conclusion in_progress. I cannot use classic download/artefact because I need to download specific artifacts with dynamical name.

from action-download-artifact.

ishanjain28 avatar ishanjain28 commented on June 7, 2024

Github's documentation on working with artifacts says,

Artifacts are uploaded during a workflow run,

and

During a workflow run, you can use the download-artifact action to download artifacts that were previously uploaded in the same workflow run.

But after testing, It looks like it only uploads artifacts(or those artifacts are only returned by the API) after the execution has finished. This feels like a bug to me but I am not sure, I'll create a ticket with github and ask them for explanation.

https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts

from action-download-artifact.

shaypi avatar shaypi commented on June 7, 2024

I'm facing the same issue despite it was working

Hi @jbrsb, I have discovered two effective workarounds. The first approach involves uploading the files to a designated storage bucket and subsequently retrieving them in the next job. Alternatively, you can utilize GitHub releases by uploading the assets to a specific release and then retrieving them in the subsequent job.

from action-download-artifact.

dawidd6 avatar dawidd6 commented on June 7, 2024

If you are using reusable workflows you need to set workflow input to the calling workflow filename instead of the one where artifact is actually uploaded. Also you need to set workflow_conclusion input to either an empty string or "in_progress".

from action-download-artifact.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.