An open API service indexing awesome lists of open source software.

https://github.com/acearchive/artifact-submit-action

A GitHub Action for submitting artifacts to Ace Archive
https://github.com/acearchive/artifact-submit-action

actions

Last synced: 5 months ago
JSON representation

A GitHub Action for submitting artifacts to Ace Archive

Awesome Lists containing this project

README

          

# artifact-submit-action

This is a GitHub Action used to validate artifacts submitted to Ace Archive and
upload submitted artifact files to the site.

Artifact submissions are JSON files in
[acearchive/artifact-submissions](https://github.com/acearchive/artifact-submissions)
which are generated by a form on the Ace Archive site. This action does the
following:

- Validates the syntax of artifact submission against a schema.
- Downloads files which do not have a file hash or a media type in their
submission and updates the job's local clone of the repo to add them. A later
step in the job can then commit these changes back to the repo.
- Uploads files to Ace Archive.

Artifact files are stored in [Cloudflare
R2](https://developers.cloudflare.com/r2). Before a file is uploaded to R2, its
hash is validated against the hash included in the JSON submission file to
ensure it has not changed since it was manually reviewed.

Artifact metadata is stored in [Cloudflare
D1](https://developers.cloudflare.com/d1). This happens by `POST`ing a JSON
document to
[submission-worker](https://github.com/acearchive/submission-worker), which then
adds the metadata to the database.

See the [`action.yaml`](./action.yaml) for documentation of the input
parameters. See
[acearchive/artifact-submissions](https://github.com/acearchive/artifact-submissions/tree/main/.github/workflows)
for an example of this action in use.

Because this is a GitHub Action written in TypeScript, you need to compile it to
JS and commit that generated code to the repo. You can do that like this:

```shell
npm run all
commit -am 'Commit generated code'
```