Code Monkey home page Code Monkey logo

Comments (71)

ghutchis avatar ghutchis commented on July 27, 2024 147

I'm going to bump this again. Many people have asked for this feature - both here, discussions, even Stack Overflow

For example, I'd really like to have the artifact URLs posted as a comment for pull requests. At the moment, this seems impossible because the URL is not available to the current workflow.

from upload-artifact.

lanyizi avatar lanyizi commented on July 27, 2024 34

It seems you can get an artifact url via https://developer.github.com/v3/actions/artifacts but the links expire within 1 minute.

Unfortunately you can't retrieve the artifact during current workflow run, it will become available in the API only after the current run finishes...

from upload-artifact.

konradpabjan avatar konradpabjan commented on July 27, 2024 28

So v4 just released today: https://github.blog/changelog/2023-12-14-github-actions-artifacts-v4-is-now-generally-available/

With it there is an artifact ID output that is immediately available and it's the same ID that is used in the current URL: https://github.com/actions/upload-artifact?tab=readme-ov-file#using-outputs So with another API call to get the check suite ID it should be possible to construct an artifact URL.

The current URL that is in the format of https://github.com/user/repo/suites/123456/artifacts/789123 is pretty bad though as it is unintuitive and we're planning on changing it to something like https://github.com/user/repo/actions/runs/123456/artifacts/789123 since the workflow run ID is available in the job and in the UI everywhere. We have an issue internally to change this (the old URLs will continue to work), and once we do that it should be pretty easy. We could have a URL output similar to the ID with V4. No estimate as to when this will come around but at least the artifact ID is immediately available now with v4 and that was the big limitation. Took a lot of work with v4 to make that work. Recommend switching to it as there are a number of big improvements!

Renamed the issue but long term this should look like this:

    - uses: actions/upload-artifact@v4
      id: artifact-upload-step
      with:
        name: my-artifact
        path: path/to/artifact/content/

    - name: Output artifact URL
      run:  echo 'Artifact URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}'

from upload-artifact.

abhijitvalluri avatar abhijitvalluri commented on July 27, 2024 24

I'm going to bump this again. Many people have asked for this feature - both here, discussions, even Stack Overflow

For example, I'd really like to have the artifact URLs posted as a comment for pull requests. At the moment, this seems impossible because the URL is not available to the current workflow.

I was hoping to do this exact thing! I would love to be able to link the artifacts to the pull request for people to download.

from upload-artifact.

mckrava avatar mckrava commented on July 27, 2024 23

It would be really useful to have access to artifacts before run completion. In my case I need retrieve artifacts download URLs and publish it in custom issue comment. And it must be done in one workflow run, I cannot use 2 separate workflows for generating artifacts and publication comment.

from upload-artifact.

konradpabjan avatar konradpabjan commented on July 27, 2024 16

@wosc Yeah so another teammate recently made the URL changes I described and the artifact URLs in the UI now doesn't rely on the check suite ID so things are much simpler! 🎉

Creating a URL with the run ID and artifact ID is now reliable and users can use this to potentially embed artifact links in a host of different places such as PR descriptions, READMEs or issues. I've gone ahead and merged in changes that support an artifact-url output: #496

The PR was merged into main and once we cut a new release then it will be accessible via the @v4 tag at which point we can close out this issue as officially done (We're working on a few more fixes/PRs before cutting a new release).

As described in my earlier content, with @main (and soon @v4) you can now get a URL with something like this.

    - uses: actions/upload-artifact@v4 (right now @main but hang tight until the next release)
      id: artifact-upload-step
      with:
        name: my-artifact
        path: path/to/artifact/content/

    - name: Output artifact URL
      run:  echo 'Artifact URL is ${{ steps.artifact-upload-step.outputs.artifact-url }}'

An important thing to keep in mind is that this URL behavior is exactly as if downloading artifacts from the run summary page in the UI. You must be logged into GitHub for it to work (if browsing as incognito than the URL doesn't even show up). If you do get your hands on a URL while not logged in than it will 404 and prompt you to login. This is for a few scenarios i've seen mentioned where if you take this URL and embed it in some external website and a non-GitHub users tries to click it (anonymous request) than it will 404 and prompt for a download. That's the way it is due to bad actors/security. Logs follows the same pattern where anonymous users/bots can't view & download logs as this opens up a DDOS/attack vector that we can protect ourselves by requiring a simple login. If you really need a download URL that works for users/services that are aren't authenticated with GitHub then the existing API that generates a 1 minute download URL is your only option. If you want some download URL for anonymous downloads for an extended period of time than unfortunately we aren't planning on supporting that due to the security concerns outlined earlier.

The plus side of this URL that is now outputted is that it will work as long as the artifact has not expired. The only other caveats are the run must not be deleted alongside the repository. If your artifact has a retention period of 100 days for example than you can add this URL to a README or somewhere in GitHub like an issue and it will work for 100 days until the artifact expires.

from upload-artifact.

jeacott1 avatar jeacott1 commented on July 27, 2024 15

@jerrymarino yeah, you are using the wrong initial url. you need to use the one here which is stable:
https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#download-an-artifact

tldr: GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}

and then follow the redirect

the real issue is that when you save an artifact you dont get the id in a response as reference later.

from upload-artifact.

djthornton1212 avatar djthornton1212 commented on July 27, 2024 14

+1: Wow 1,084 day since this was requested and not a peep. I just can't fathom how GitHub thinks this is ok. If I went this long without responding to a customer request (even just to say sorry no can do) I don't think my business would last long.

At times it feels like Actions is just an after thought to them.

from upload-artifact.

wosc avatar wosc commented on July 27, 2024 13

Thanks @konradpabjan for the heavy lifting that has gone into v4! I've just tried the following, and that simply worked, I could download the artifact from the URL this generated, no suite-ID or other complications required. So to me this says, the main usecase as outlined in the issue description is now supported by v4 (even if it might be made more convenient to use later on :), which is great news if true! 🎉 (Or did I misunderstand your message, is this a happy accident that is not guaranteed to work, or something else entirely?)

    - uses: actions/upload-artifact@v4
      id: artifact-upload-step
      with:
        name: my-artifact
        path: path/to/artifact/content/

    - name: Output artifact URL
      run:  echo 'Artifact URL is ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.artifact-upload-step.outputs.artifact-id }}'

from upload-artifact.

tonyhallett avatar tonyhallett commented on July 27, 2024 12

@ghutchis @abhijitvalluri
I have created this action that creates a comment in pull request and/or associated issues with the link to all / subset of artifacts
https://github.com/marketplace/actions/workflow-artifact-pull-request-comment

from upload-artifact.

DanRunfola avatar DanRunfola commented on July 27, 2024 11

Just adding a +1 here - right now, we're considering all sorts of hacky things (uploading artifacts to a seperate FTP server so we can serve links in PRs, woo...).

from upload-artifact.

iflederick avatar iflederick commented on July 27, 2024 11

+1: need the artifact id (or download url) as an output too

from upload-artifact.

gpavlov2016 avatar gpavlov2016 commented on July 27, 2024 9

+1: need it too

from upload-artifact.

NJannasch avatar NJannasch commented on July 27, 2024 9

It would be great to have this feature available.

from upload-artifact.

mxxk avatar mxxk commented on July 27, 2024 8

As mentioned in #50 (comment), the GitHub Actions Artifacts API does not show artifacts uploaded during a workflow until after that run has finished. And yet, this is precisely what actions/download-artifact is doing in this official example from Passing data between jobs in a workflow:

job_1:
  steps:
    - uses: actions/upload-artifact@v3
      with:
        name: homework
        path: math-homework.txt
job_2:
  steps:
    - uses: actions/download-artifact@v3
      with:
        name: homework

Interestingly, actions/download-artifact@v3 accomplishes this via @actions/artifact method downloadArtifact, which lists all artifacts for the current run and filters for the requested artifact by name:

const artifacts = await downloadHttpClient.listArtifacts()
if (artifacts.count === 0) {
  throw new Error(
    `Unable to find any artifacts for the associated workflow`
  )
}

const artifactToDownload = artifacts.value.find(artifact => {
  return artifact.name === name
})

Source: actions/toolkit@6c1f9:packages/artifact/src/internal/artifact-client.ts#L164-L173


I presume @actions/artifact can access uploaded artifacts before the run has finished because it uses a private GitHub Actions API:

export function getArtifactUrl(): string {
  const artifactUrl = `${getRuntimeUrl()}_apis/pipelines/workflows/${getWorkFlowRunId()}/artifacts?api-version=${getApiVersion()}`
  debug(`Artifact Url: ${artifactUrl}`)
  return artifactUrl
}

Source: actions/toolkit@6c1f9:packages/artifact/src/internal/utils.ts#L221-L225


Unfortunately, @actions/artifact does not provide a way to obtain the artifact URL without downloading the artifact.

Based on this, GitHub already has the means to access uploaded artifacts before the run is finished. What is missing is a way to get the artifact URL without also downloading it.

from upload-artifact.

etaormm avatar etaormm commented on July 27, 2024 8

Since no one picked up this issue yet, I've created a new one -- hopefully someone will see it -> #382

from upload-artifact.

chshersh avatar chshersh commented on July 27, 2024 7

This would be a really nice feature to have! I'm working on a Docker image GitHub Action and I want to upload some assets before running my action so they can be used inside the Docker container. If the upload-artifact action provides a URL to the asset as an output, the I can pass this output as an argument to my action and download the asset using curl from inside Docker container.

from upload-artifact.

lelegard avatar lelegard commented on July 27, 2024 7

I originally posted this topic more than two years ago. It got 134 👍 and 23 responses, mostly "I would like it too". The suggestion does not seem too difficult. And we got zero feedback from the Github team. They probably follow their own track and ignore users' requests. This is a bit frustrating. But, let's be realistic, this is a free service, we have no influence.

from upload-artifact.

lelegard avatar lelegard commented on July 27, 2024 7

Off topic a bit: but @lelegard free?. Yes, there's a free tier, but there are many paid users.

@TWiStErRob, is there any kind of "premium support" channel for corporate users who pay, where this kind of request could get some response?

Open source developers and free users acknowledge their lack of influence.

from upload-artifact.

anatoliykant avatar anatoliykant commented on July 27, 2024 7

Do you have any information for us? 🤔
We have a paid subscription and spend a lot of money on a github action.
I have a lot of experience in setting up ci/cd of different services and we are easily ready to switch to another one (for example, gitlab ci / bitrise / xcode cloud for ios).
The only problem is getting the url for the artifact that our testers use. 😢
The fact that you simply ignore the developers and users of your service for 2 years does not say anything good about you. 😤
At least you could notify us about the approximate dates or write that this feature will never be made. Then we wouldn't bother you.

from upload-artifact.

gilzow avatar gilzow commented on July 27, 2024 7

I would love to be able to link the artifacts to the pull request for people to download.

This is exactly what I've been trying to do and finally came across this issue. Seems like a reasonable request. If I run a test, and the test fails, I'd like to store the test results as an artifact and post a link to those results as a comment on the PR so people can see why a test failed.

from upload-artifact.

Andre601 avatar Andre601 commented on July 27, 2024 7

(This is a personal thing, so don't take it as anything official or as representation of anyone else)

Rant: [On]

Would apreciate if you wouldn't comment with "+1" here... If you have something important to contribute, do that. But posting just "+1" is not contributing anything.
If you want to support this idea, add a +1 reaction to the OP.

Also, I'm sure we would've gotten a reply by a maintainer if there were any updates whatsoever.
From what I understand is this feature currently not possible due to lacking API endpoints on GitHub's end (Iirc is the issue, that the (final) download URL for artifacts isn't available/generated until the job has ended, making it not accessible in-between steps).

So, please safe me and probs other peoples time (and storage on the mail inbox) by not replying with "+1" or alike... It doesn't help.

Rant: [Off]

from upload-artifact.

TWiStErRob avatar TWiStErRob commented on July 27, 2024 4

Off topic a bit: but @lelegard free?. Yes, there's a free tier, but there are many paid users.

On topic: this is the second most voted issue in this repo, with an easy fix, I think it deserves an @actions to please check this TL;DR and respond.

@lelegard a tip: in OP you were asking for env., but actions have outputs. Here is live example.

from upload-artifact.

egarc12 avatar egarc12 commented on July 27, 2024 4

+1, need the download url as an output to send it in email :(

from upload-artifact.

djthornton1212 avatar djthornton1212 commented on July 27, 2024 3

@Andre601

You can use the gh cli to get the url.

gh api "/repos/{owner}/{repo}/actions/artifacts"

In the return json is the key archive_download_url. You can use that to download. If you're using Actions you can also use dawidd6/action-download-artifact. If you use unique names for your artifacts it will find that specific artifact and download it.

Note: The dawidd6/action-download-artifact cannot download artifacts from the same run, but can from other runs.

- name: Download PR Workspace
  uses: dawidd6/[email protected]
  with:
    if_no_artifact_found: fail
    github_token: ${{secrets.GITHUB_TOKEN}}
    name: ${{ env.ARTIFACT_NAME }}

You can checkout the action here.

from upload-artifact.

Kalgros20 avatar Kalgros20 commented on July 27, 2024 2

Any updates? There's a real intention to provide the ID after the upload?

from upload-artifact.

cansavvy avatar cansavvy commented on July 27, 2024 2

+1 This feature would save me so many headaches! Would be so awesome!

from upload-artifact.

gilzow avatar gilzow commented on July 27, 2024 2

makes me wonder how many up votes we need to gather before @konradpabjan (or someone else) will notice and finally implement this feature. 🤔

from upload-artifact.

jperl avatar jperl commented on July 27, 2024 1

Ideally you could set it so the links do not expire, and they would serve the correct Content-Type so you could link to images/gifs/videos.

It seems you can get an artifact url via https://developer.github.com/v3/actions/artifacts but the links expire within 1 minute.

from upload-artifact.

jjangga0214 avatar jjangga0214 commented on July 27, 2024 1

@jperl Hmm, I see. I made an independent issue, #60.
This is just letting you know, for the case you want to subscribe or participate in it :)

from upload-artifact.

domenkozar avatar domenkozar commented on July 27, 2024 1

It seems you can get an artifact url via https://developer.github.com/v3/actions/artifacts but the links expire within 1 minute.

Unfortunately you can't retrieve the artifact during current workflow run, it will become available in the API only after the current run finishes...

I wonder if you could use https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_run then to process that

from upload-artifact.

maksimonishchenko avatar maksimonishchenko commented on July 27, 2024 1

+1 lol its fantastik and only feature lack that stops my super duper company to buy github organization license

from upload-artifact.

semack avatar semack commented on July 27, 2024 1

makes me wonder how many up votes we need to gather before @konradpabjan (or someone else) will notice and finally implement this feature. 🤔

It could be impossible in the current GitHub design. Artefact Id could be unknown while the workflow runs. But I hope I'm wrong.

from upload-artifact.

Andre601 avatar Andre601 commented on July 27, 2024 1

Hey everyone. I'm curious to know if there is an easy way to obtain the artifact URL from a former job (Not step) for a job depending on the former?
Given the fact that I can download artifacts uploaded in a previous job using the download-artifact action tells me that there is a way to obtain the URL. My question is, if that way is easy to achieve within GitHub Actions...

I know this isn't really the place to ask, but my attempts at asking on the GitHub Community ended on deaf ears unfortunately.

from upload-artifact.

lukasc-ubc avatar lukasc-ubc commented on July 27, 2024 1

Thank you for the improvements to the Artifact upload/download.

I am wondering if it is possible to have the Artifact go into a permanent URL? I would like my GitHub repo Readme.md file have the URL in the main document, so people can download the Artifact directly. Similar to how the Releases / Latest buttom works. But ideally it would be just a fixed URL, and where the latest Artifact always overwrites the fixed URL.

thank you
Lukas

from upload-artifact.

konradpabjan avatar konradpabjan commented on July 27, 2024 1

Ah, forgot to close this issue out after #496 went in and the v4 tag was updated. Closing out now

from upload-artifact.

jjangga0214 avatar jjangga0214 commented on July 27, 2024

@jperl Do you know why it's to be expired after 1 minute?

from upload-artifact.

jperl avatar jperl commented on July 27, 2024

I do not know why, that is just what their documentation says.

from upload-artifact.

jeacott1 avatar jeacott1 commented on July 27, 2024

+1 for this, or at least the artifact id.
@jjangga0214 @jperl the timeout is only for the redirect url. the actual rest endpoint is constant. ref https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#download-an-artifact

I'd find this especially useful to use if I split my pull request and release workflows. I could then reference the artifact built and tested in the PR and publish that directly on release.

from upload-artifact.

jerrymarino avatar jerrymarino commented on July 27, 2024

💯 would love to see this feature. I attempted to run curl on the artifact for XCHammer in the browser and was surprised to see it wasn't working. The use case of this feature would be to pull the artifact into Bazel, but it'd need some stable URL to do this.

It seems like the only alternative is to create a release to create a stable URL but that might be confusing and spam the watchers if we end up doing a release per commit.

from upload-artifact.

jeacott1 avatar jeacott1 commented on July 27, 2024

@jerrymarino afaict the url is stable, but you have to follow the redirect to get the artifact.

from upload-artifact.

jerrymarino avatar jerrymarino commented on July 27, 2024

@jeacott1 It'd be awesome for the workflow in question it'd work! Perhaps we're talking about different URLs then - I'm hoping to consume the artifact urls on the github website found via browser and they seem incompatible with curl and bazel:

I've attempted to do the following steps to pull artifacts with curl and Bazel

  1. navigate to https://github.com/pinterest/xchammer/actions/runs/283307177 in a web browser
  2. under Artifacts get the link for xchammer by right clicking xchammer ( https://github.com/pinterest/xchammer/suites/1276155763/artifacts/19716224 )
  3. try to pull with curl following redirects curl -L https://github.com/pinterest/xchammer/suites/1276155763/artifacts/19716224
    When I ran that command a few mins ago I get Not Found

I circulated though a few other issues and found mentions of artifact URL from a github actions API that lasts 1 minute. Is this the URL you're pointing to?

from upload-artifact.

cdanek avatar cdanek commented on July 27, 2024

+1 for this feature request.

from upload-artifact.

matthewcrozier avatar matthewcrozier commented on July 27, 2024

+1 - this would be a very useful feature!

from upload-artifact.

shink avatar shink commented on July 27, 2024

+1 Looking forward to this useful feature!!!

from upload-artifact.

mattpopa avatar mattpopa commented on July 27, 2024

This feature would be nice, looking forward to it too

from upload-artifact.

ghutchis avatar ghutchis commented on July 27, 2024

Yes, it's a bit frustrating. I've used @tonyhallett action as linked above. It works well for https://github.com/openchemistry/avogadrolibs - It would be great if GitHub added this support, but in the meantime, there is a workaround.

from upload-artifact.

vwcruzeiro avatar vwcruzeiro commented on July 27, 2024

+1 : this feature would be useful to me.

from upload-artifact.

deco-dev avatar deco-dev commented on July 27, 2024

+1 : this would be useful to me.

from upload-artifact.

geek-kb avatar geek-kb commented on July 27, 2024

+1 : this feature would be useful to me.

from upload-artifact.

TWiStErRob avatar TWiStErRob commented on July 27, 2024

Off-topic

@TWiStErRob, is there any kind of "premium support" channel for corporate users who pay, where this kind of request could get some response?

@lelegard There's this: https://github.com/premium-support, but it doesn't guarantee any prioritization, just a +1. With bugs, it might be different, but this isn't broken, it's just missing 😞 → backlog.

from upload-artifact.

sebastiandg7 avatar sebastiandg7 commented on July 27, 2024

+1! Keeping this alive.

from upload-artifact.

sammcj avatar sammcj commented on July 27, 2024

Any update on this?

from upload-artifact.

lelegard avatar lelegard commented on July 27, 2024

Any update on this?

Nope. Almost 3 years since I opened it. Still watching it. No news. Most probably, will never be implemented.

from upload-artifact.

saerosV avatar saerosV commented on July 27, 2024

@konradpabjan any comments on this? This feature would be really useful.

The Actions API doesn't seem to properly adress the problem (in an easy manner).

Here's a similar issue, that was (in my opinion) mistakenly closed.

from upload-artifact.

semack avatar semack commented on July 27, 2024

+1

from upload-artifact.

Andre601 avatar Andre601 commented on July 27, 2024

@Andre601

You can use the gh cli to get the url.

gh api "/repos/{owner}/{repo}/actions/artifacts"

In the return json is the key archive_download_url. You can use that to download. If you're using Actions you can also use dawidd6/action-download-artifact. If you use unique names for your artifacts it will find that specific artifact and download it.

Note: The dawidd6/action-download-artifact cannot download artifacts from the same run, but can from other runs.

- name: Download PR Workspace
  uses: dawidd6/[email protected]
  with:
    if_no_artifact_found: fail
    github_token: ${{secrets.GITHUB_TOKEN}}
    name: ${{ env.ARTIFACT_NAME }}

You can checkout the action here.

It's not really about the download, but just getting the URL to it...

from upload-artifact.

erikmd avatar erikmd commented on July 27, 2024

@Andre601

Hey everyone. I'm curious to know if there is an easy way to obtain the artifact URL from a former job (Not step) for a job depending on the former?
Given the fact that I can download artifacts uploaded in a previous job using the download-artifact action tells me that there is a way to obtain the URL. My question is, if that way is easy to achieve within GitHub Actions...

FWIW,
I coded a GHA workflow that gets the perennial url of artifacts & 'pin' them as commit statuses (cf. this stackoverflow post)
Not sure if that fits your use case though.

from upload-artifact.

Andre601 avatar Andre601 commented on July 27, 2024

FWIW,
I coded a GHA workflow that gets the perennial url of artifacts & 'pin' them as commit statuses (cf. this stackoverflow post)
Not sure if that fits your use case though.

Thanks for the info.
Tho, this not only looks over complicated, but also doesn't quite help me understand how to obtain the URL actually...
Like my goal is to post a comment containing the URL for it. Nothing more, nothing less. I appreciate the info tho.

To not further off-topic this would I like any further discussions to go into the discussion I still have open on the community repository: https://github.com/orgs/community/discussions/51403

from upload-artifact.

djthornton1212 avatar djthornton1212 commented on July 27, 2024

@Andre601
You can use the gh cli to get the url.

gh api "/repos/{owner}/{repo}/actions/artifacts"

In the return json is the key archive_download_url. You can use that to download. If you're using Actions you can also use dawidd6/action-download-artifact. If you use unique names for your artifacts it will find that specific artifact and download it.
Note: The dawidd6/action-download-artifact cannot download artifacts from the same run, but can from other runs.

- name: Download PR Workspace
  uses: dawidd6/[email protected]
  with:
    if_no_artifact_found: fail
    github_token: ${{secrets.GITHUB_TOKEN}}
    name: ${{ env.ARTIFACT_NAME }}

You can checkout the action here.

It's not really about the download, but just getting the URL to it...

Got it, then I think using the api to get it will work for you.

from upload-artifact.

gisheri avatar gisheri commented on July 27, 2024

+1 fwiw

from upload-artifact.

BarNehemia avatar BarNehemia commented on July 27, 2024

+1 any news?

from upload-artifact.

arlindiDev avatar arlindiDev commented on July 27, 2024

+1

from upload-artifact.

scuderiaf1 avatar scuderiaf1 commented on July 27, 2024

+1

from upload-artifact.

sujanp-kr avatar sujanp-kr commented on July 27, 2024

+1
I need.
Plus, essentially a necessary feature.
When happening 🤔

from upload-artifact.

lyskouski avatar lyskouski commented on July 27, 2024

Thanks to @djthornton1212
https://github.com/orgs/community/discussions/51403#discussioncomment-5515349

I've been able to reproduce the capability of taking artifacts URL [ref] . The main case that artifacts are not accessible via gh api "/repos/${{ github.repository }}/actions/artifacts for ongoing workflows. And the second tip, that referenced pipe should be merged into the targeted branch, otherwise, it won't be recognized by "on: workflow_run:".

from upload-artifact.

TWiStErRob avatar TWiStErRob commented on July 27, 2024

Amazing Konrad, thank you for the update!


Friendly reminder for users not to use this new feature for stable releasing... download the artifact from a workflow run and upload the files to the release as (different type of) artifacts for permanent storage on the Releases.

from upload-artifact.

wosc avatar wosc commented on July 27, 2024

Thank you Konrad and team, that's excellent news!

from upload-artifact.

pinpox avatar pinpox commented on July 27, 2024

What is the correct syntax to include the URL in a markdown README.md file?
I tried adding ${{ steps.artifact-upload-step.outputs.artifact-url }} to the markdown, but the variable is not being inserted and the markdown renders as is

from upload-artifact.

Danstiv avatar Danstiv commented on July 27, 2024

Hello @konradpabjan
Can you please explain the actions/download-artifact strange feature?

If you really need a download URL that works for users/services that are aren't authenticated with GitHub then the existing API that generates a 1 minute download URL is your only option.

I tried to get that url using curl with "token ${{ secrets.GITHUB_TOKEN }}" and got the error "Resource not accessible by integration".
After spending some time, I found out that to perform this action permission actions read should be set, and with this permission everything worked.
And in this case, I don't understand how actions/download-artifact downloads the artifact with out needed permission?
The same api is used there, probably the same request is sent, but for some reason it is completes successfully even without actions read permission.
So the question is, why and how does it work?
Thanks in advance for your answer.

from upload-artifact.

TWiStErRob avatar TWiStErRob commented on July 27, 2024

at which point we can close out this issue as officially done -- #50 (comment)

@konradpabjan https://github.com/actions/upload-artifact/blob/v4/action.yml#L50

from upload-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.