-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3e743d5
Showing
23 changed files
with
3,332 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.git | ||
.gitignore | ||
.gitlab-ci.yml | ||
.releaserc.json | ||
README.md | ||
target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
on: | ||
push: | ||
paths: | ||
- .github/workflows/ci.yml | ||
- '**.rs' | ||
- '**/Cargo.toml' | ||
- '**/Cargo.lock' | ||
pull_request: | ||
paths: | ||
- .github/workflows/ci.yml | ||
- '**.rs' | ||
- '**/Cargo.toml' | ||
- '**/Cargo.lock' | ||
|
||
env: | ||
CARGO_TERM_COLOURS: always | ||
|
||
name: continuous integration | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: cache cargo registry | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: install rust toolchain | ||
run: | | ||
rustup update | ||
rustup component add clippy rustfmt | ||
rustup install nightly | ||
- name: fmt | ||
run: cargo fmt -- --check | ||
|
||
- name: clippy | ||
run: cargo clippy | ||
|
||
- name: build | ||
run: cargo build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
name: release | ||
|
||
jobs: | ||
build-and-publish-image: | ||
name: build and publish image | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: login to the registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: get metadata (tags, labels) | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: build and push container image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
# TO-DO: create-release and upload-release-asset are no longer maintained | ||
# we should create our actions | ||
build: | ||
name: create github release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.tgz | ||
*.swp | ||
scratch.md | ||
target | ||
todo.md |
Oops, something went wrong.