Skip to content

Commit

Permalink
Build image
Browse files Browse the repository at this point in the history
  • Loading branch information
whatisaphone committed May 1, 2021
1 parent 73d8597 commit 3eaa993
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 16 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,16 @@
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions

name: Release
on:
push:
tags: [v*]
jobs:
docker:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: |
tag=ghcr.io/${GITHUB_REPOSITORY}:${GITHUB_REF#refs/tags/v}
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${GITHUB_ACTOR}" --password-stdin
docker build . -f deploy/Dockerfile -t "${tag}"
docker push "${tag}"
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
@@ -1,8 +1,8 @@
# https://doc.rust-lang.org/cargo/reference/manifest.html

[package]
name = "nirvana-rust"
version = "0.0.0"
name = "ingress-status-sync"
version = "0.0.1"
authors = ["John Simon <john@whatisaph.one>"]
edition = "2018"

Expand Down
14 changes: 14 additions & 0 deletions deploy/Dockerfile
@@ -0,0 +1,14 @@
FROM rust:1.51.0-slim-buster AS build

WORKDIR /opt/build
COPY Cargo.toml Cargo.lock ./
COPY src src
RUN cargo build --release

################################################################################

FROM debian:buster-slim

COPY --from=build /opt/build/target/release/ingress-status-sync /opt/ingress-status-sync

ENTRYPOINT ["/opt/ingress-status-sync"]

0 comments on commit 3eaa993

Please sign in to comment.