name: niks3 Upload description: Upload paths to a binary cache inputs: server-url: description: niks3 Server URL default: https://niks3.tami.moe required: false token: description: The api token in niks3 required: true pin: description: The name of the pin required: true # enable-openid-connect: true runs: using: composite steps: - name: setup authentication run: | # echo "url is: $ACTIONS_ID_TOKEN_REQUEST_URL" # curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://niks3.tami.moe" > /run/niks3-auth-token export NIKS3_AUTH_TOKEN_FILE=$(mktemp) printf '%s' "$TOKEN" > "$NIKS3_AUTH_TOKEN_FILE" echo "set up environment for niks3" echo "NIKS3_AUTH_TOKEN_FILE=$NIKS3_AUTH_TOKEN_FILE" >> "$FORGEJO_ENV" echo "NIKS3_SERVER_URL=$NIKS3_SERVER_URL" >> "$FORGEJO_ENV" env: NIKS3_SERVER_URL: ${{ inputs.server-url }} TOKEN: ${{ inputs.token }} - name: upload artifact if: inputs.pin != '' run: niks3 push --pin "$NAME" "$(realpath result)" env: NAME: ${{ inputs.pin }}