Github action Save images with CURL, it saves blank images

1k views Asked by At

I am trying to update app icon before building app using Github action using this command

 - name: add icon
   run: curl https://www.example.org/precomposed.png  >  android/app/src/main/res/drawable/ic_launcher_milla.png  


This code make a black image or a blank image not the real image from url
How to fix this issue?

1

There are 1 answers

11
Krzysztof Madej On

Are you sure that the issue is with curl? I tested it on publicly available file and all looks fine.

name: Curl PNG

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
  
  workflow_dispatch:

jobs:
  run_tests:
    runs-on: ubuntu-20.04
    steps:
    - name: add icon
      run:  curl https://i.pinimg.com/originals/ca/a9/df/caa9df0ae36595e7d4b9961596adc218.png > some.png
    - uses: actions/upload-artifact@v2
      with:
        name: my-artifact
        path: some.png