I have a js
file like this, which should return me a string to use later in the action
:
action.js
async function getData(){
const url = "https://upload.wikimedia.org/wikipedia/commons/thumb/7/71/Meet_Truffle%21.jpg/440px-Meet_Truffle%21.jpg";
return url;
}
getData().then((url) => {
return url;
});
I did a similar thing but it doesn't seem to work, can you tell me how I can do it?
Pull.yml
- name: Url
run: node ./action.js >> $URL
- uses: suisei-cn/actions-download-file@v1
id: downloadfile
name: Download the file
with:
url: $URL
target: assets/