12529c52377237c8df16f5f4e6600019036d9941 — Stephen Paul Weber a month ago 25ae67f
Use a cURL headers file instead of env vars
2 files changed, 6 insertions(+), 10 deletions(-)

M .builds.dhall/debian-stable.dhall
M .builds/debian-stable.yml
M .builds.dhall/debian-stable.dhall => .builds.dhall/debian-stable.dhall +3 -5
@@ 16,7 16,7 @@ },
  	sources = ["https://git.sr.ht/~singpolyma/dhall-ruby"],
  	environment = { CI = 1 },
- 	secrets = ["253ed950-242c-4d53-ba56-5cf1175e7d29"],
+ 	secrets = ["c2675a05-0d2f-4f45-af27-0af04a1fb9fe"],
  	tasks = map Map Map (map Entry Entry (\(sentry: Entry) ->
  		sentry // { mapValue = "cd dhall-ruby\n" ++ sentry.mapValue }
  	)) [


@@ 27,16 27,14 @@ ''
  			bundle exec ruby -E UTF-8 bin/dhall-compile -e -o /tmp/Prelude dhall-lang/Prelude
  			cd /tmp
- 			. ~/.pinata
- 			curl -H "pinata_api_key: $PINATA_API_KEY" -H "pinata_secret_api_key: $PINATA_SECRET_API_KEY" https://api.pinata.cloud/pinning/pinFileToIPFS $(find Prelude -type f -printf "-F'file=@%h/%f' ")
+ 			curl -H @$HOME/.pinata https://api.pinata.cloud/pinning/pinFileToIPFS -FpinataMetadata="{\"name\": \"Prelude $(date -I)\"}" $(find Prelude -type f -printf "-Ffile=@%h/%f;filename=%h/%f ")
  			''
  		}],
  		[{ mapKey = "cache_prelude", mapValue =
  			''
  			bundle exec ruby -E UTF-8 bin/dhall-compile -co /tmp/PreludeCache dhall-lang/Prelude
  			cd /tmp
- 			. ~/.pinata
- 			curl -H "pinata_api_key: $PINATA_API_KEY" -H "pinata_secret_api_key: $PINATA_SECRET_API_KEY" https://api.pinata.cloud/pinning/pinFileToIPFS $(find PreludeCache -type f -printf "-F'file=@%h/%f' ")
+ 			curl -H @$HOME/.pinata https://api.pinata.cloud/pinning/pinFileToIPFS -FpinataMetadata="{\"name\": \"Prelude Cache $(date -I)\"}" $(find PreludeCache -type f -printf "-Ffile=@%h/%f;filename=%h/%f ")
  			''
  		}]
  	]

M .builds/debian-stable.yml => .builds/debian-stable.yml +3 -5
@@ 1,6 1,6 @@ image: debian/stable
  secrets:
- - 253ed950-242c-4d53-ba56-5cf1175e7d29
+ - c2675a05-0d2f-4f45-af27-0af04a1fb9fe
  environment:
    CI: 1
  sources:


@@ 19,14 19,12 @@ cd dhall-ruby
      bundle exec ruby -E UTF-8 bin/dhall-compile -e -o /tmp/Prelude dhall-lang/Prelude
      cd /tmp
-     . ~/.pinata
-     curl -H "pinata_api_key: $PINATA_API_KEY" -H "pinata_secret_api_key: $PINATA_SECRET_API_KEY" https://api.pinata.cloud/pinning/pinFileToIPFS $(find Prelude -type f -printf "-F'file=@%h/%f' ")
+     curl -H @$HOME/.pinata https://api.pinata.cloud/pinning/pinFileToIPFS -FpinataMetadata="{\"name\": \"Prelude $(date -I)\"}" $(find Prelude -type f -printf "-Ffile=@%h/%f;filename=%h/%f ")
  - cache_prelude: |
      cd dhall-ruby
      bundle exec ruby -E UTF-8 bin/dhall-compile -co /tmp/PreludeCache dhall-lang/Prelude
      cd /tmp
-     . ~/.pinata
-     curl -H "pinata_api_key: $PINATA_API_KEY" -H "pinata_secret_api_key: $PINATA_SECRET_API_KEY" https://api.pinata.cloud/pinning/pinFileToIPFS $(find PreludeCache -type f -printf "-F'file=@%h/%f' ")
+     curl -H @$HOME/.pinata https://api.pinata.cloud/pinning/pinFileToIPFS -FpinataMetadata="{\"name\": \"Prelude Cache $(date -I)\"}" $(find PreludeCache -type f -printf "-Ffile=@%h/%f;filename=%h/%f ")
  packages:
  - bundler
  - curl