Skip to content

make json

make json #17

name: Update TUF Seeds
on:
workflow_dispatch:
push:
permissions:
contents: read
jobs:
update-tuf-seeds:
runs-on: ubuntu-latest
env:
DEBUG: "tuf:*"
TUF_MIRROR: https://tuf-repo-cdn.sigstore.dev
steps:
- name: Get Targets
run: |
npx @tufjs/cli download --metadata-base-url ${TUF_MIRROR} --cache-path ${{ runner.temp }}/tuf --unsafe-root-download --target-name trusted_root.json
npx @tufjs/cli download --metadata-base-url ${TUF_MIRROR} --cache-path ${{ runner.temp }}/tuf --unsafe-root-download --target-name registry.npmjs.org/keys.json
- name: ls
run: tree ${{ runner.temp }}
- name: make new
run: |
jq -n -c \
--arg root "$(cat ${{ runner.temp }}/tuf/root.json | base64)" \
--arg trusted_root "$(cat ${{ runner.temp }}/tuf/targets/trusted_root.json | base64)" \
'{"foo":{"root.json":$root,"targets":{"trusted_root.json":$trusted_root}}}'