Skip to content

Commit

Permalink
whip up a little workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
FredrikAugust committed Apr 24, 2024
1 parent 47023ff commit 7f9fc82
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target/
renovate.json
37 changes: 37 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Rust

on:
push:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=sha
type=raw,value={{date 'YYYY-MM-DDTHH:mm:ss' tz='Europe/Paris' }}
type=ref,event=branch
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: true
platforms: linux/amd64
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM rust:1.74.1 as builder
WORKDIR /usr/src/debrief
COPY . .
RUN cargo install --path .

FROM debian:bookworm-slim

RUN apt update && apt install -y openssl

COPY --from=builder /usr/local/cargo/bin/debrief /usr/local/bin/debrief
CMD ["debrief"]

0 comments on commit 7f9fc82

Please sign in to comment.