Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada committed Sep 16, 2023
0 parents commit eafc54b
Show file tree
Hide file tree
Showing 16 changed files with 1,565 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- "dependencies"
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"
labels:
- "dependencies"
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: Build

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [macos]
steps:
- uses: actions/checkout@v4

- uses: hecrj/[email protected]

- uses: Swatinem/[email protected]
with:
key: ${{ runner.os }}

# same checks as with `cargo build`, but no binaries are generated at the end, saving some time.
- run: cargo check

check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hecrj/[email protected]
with:
rust-version: stable
components: rustfmt
- run: cargo fmt -- --check

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: hecrj/[email protected]
with:
rust-version: stable
components: clippy

- uses: Swatinem/[email protected]
with:
key: lint

- run: cargo clippy
11 changes: 11 additions & 0 deletions .github/workflows/changelog-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Changelog Checker

on:
pull_request:

jobs:
changelog-check:
runs-on: ubuntu-latest
steps:
- uses: ./
65 changes: 65 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
name: Docker

on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master

# Publish `v1.2.3` tags as releases.
tags:
- v*

# Run tests for any PRs.
pull_request:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- name: Run tests
run: docker build . --file Dockerfile.build

push:
needs: test

runs-on: ubuntu-22.04
if: github.event_name == 'push'
permissions:
packages: write
contents: read

steps:
- uses: actions/checkout@v4

- name: Log into GitHub Container Registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09
with:
file: Dockerfile.build
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

## Unreleased

- Remove anyhow dependency. (#9)
- Test
- Foo
- Bar
- Base

## 0.0.1

- Test
- hehe
Loading

0 comments on commit eafc54b

Please sign in to comment.