Skip to content

Commit

Permalink
Add readme, minor housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
jssblck committed Dec 2, 2024
1 parent b5ae4d9 commit 9eb2eb7
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 25 deletions.
13 changes: 13 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Default owner for everything else.
* @fossas/analysis

# The following files have no owner,
# this allows PRs that only update dependencies
# to be merged without review
# (e.g. by dependabot or by team members).
#
# The codeowners file is parsed in bottom-up precedence,
# so these are matched before the universal glob above.
**/Cargo.toml
Cargo.lock
Cargo.toml
21 changes: 21 additions & 0 deletions .github/workflows/auto-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: dependabot-automation

on: pull_request
permissions:
contents: write
pull-requests: write

jobs:
automerge:
runs-on: ubuntu-latest
steps:
- run: gh pr review --approve "$PR_URL"
if: github.actor == 'dependabot[bot]'
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: gh pr merge --auto --squash "$PR_URL"
if: github.actor == 'dependabot[bot]'
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
4 changes: 2 additions & 2 deletions .github/workflows/check-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: "curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash"
- uses: actions/checkout@v4
- run: "curl https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash"

- run: fossa analyze --only-target cargo .
env:
Expand Down
49 changes: 26 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
# template-rust
# circe

Template repository for a Rust project.
_Circe (named after the Odyssean sorceress who transformed vessels and their contents) extracts and examines the contents of containers._

TODOs for a new project:
- [ ] Change the license if MPL2 is not appropriate for the project. Make sure to do this before adding any code.
- [ ] Ensure the dev docs (in particular the release and compatibility semantics) are valid for this project.
- [ ] Set [CODEOWNERS] to the team that owns the repository.
- [ ] Create an API user in [FOSSA] and store it as a secret named `FOSSA_API_KEY`.
- Consider naming it with the pattern `ci-{REPO_NAME}`. For example, `ci-template-rust`.
- [ ] Update repository permissions as appropriate. Generally, the CODEOWNER team is set as admin.
- [ ] Update branch protection rules as appropriate.
- [ ] Update repository features and settings. Recommended defaults:
- [ ] Turn off all features (Wikis, Issues, Sponsorships, Discussions, Projects); FOSSA uses other systems for these.
- [ ] Only allow squash merging.
- [ ] Always suggest updating PR branches.
- [ ] Allow auto-merge.
- [ ] Automatically delete head branches.
# usage

Then just edit the included Rust project, or remove it and `cargo init` your project, and get going!
TBD, but generally the goal will be something like:

[codeowners]: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
[fossa]: https://app.fossa.com
```shell
# Export the contents of the image to disk
; circe extract docker.io/contribsys/faktory:latest ./faktory --layers squash --platform linux/amd64

# recommendations
# Export the contents of the image to stdout as NDJSON
; circe read docker.io/contribsys/faktory:latest --layers squash --platform linux/amd64
```

- If publishing a Linux binary, consider providing two: one that [statically links libc](./docs/dev/reference/static-binary.md), and one that doesn't.
- If publishing a macOS binary, consider providing two: one for [Intel and one for M-series CPUs](./docs/dev/reference/macos-arch.md).
- If this application may be used on AWS Graviton or similar, consider providing an ARM build for Linux as well.
# planned features

- [ ] Support extracting contents of OCI images:
- [ ] From OCI stores
- [ ] From local container hosts (e.g. Docker)
- [ ] From local tarballs
- [ ] Extract the contents:
- [ ] To disk
- [ ] To stdout (as NDJSON)
- [ ] Extract layers by:
- [ ] Squashed layer sets (e.g. "base + rest" or "all layers" or other combinations)
- [ ] Individual layers
- [ ] Filtered layers
- [ ] Specify target(s) to extract (e.g. `linux/amd64`, `darwin/arch64`, etc)
- [ ] Filter file(s) to extract
- [ ] When extracting files to stdout, store large blobs at temporary locations and reference them

0 comments on commit 9eb2eb7

Please sign in to comment.