Skip to content

Commit ca94b4c

Browse files
Rack build workflow
1 parent 24b7b6d commit ca94b4c

File tree

2 files changed

+83
-1
lines changed

2 files changed

+83
-1
lines changed

.github/workflows/build.yml

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
on:
2+
push:
3+
tags:
4+
- "v*.*.*"
5+
6+
name: Build and Release
7+
8+
jobs:
9+
build-releases:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Cache build artifacts
17+
id: cache-cargo
18+
uses: actions/cache@v2
19+
with:
20+
path: |
21+
~/.cargo/bin
22+
~/.cargo/registry
23+
~/.cargo/git
24+
target
25+
key: build-${{ runner.os }}-cargo-any
26+
27+
- name: Install Rust toolchain
28+
uses: actions-rs/toolchain@v1
29+
with:
30+
toolchain: stable
31+
components: rustfmt
32+
override: true
33+
34+
- name: Install cross-compilation tools (if needed)
35+
run: which cross >/dev/null || cargo install cross
36+
37+
- name: Verify versions
38+
run: rustc --version && rustup --version && cargo --version && cross --version
39+
40+
- name: Get current tag
41+
id: current_tag
42+
uses: WyriHaximus/github-action-get-previous-tag@v1
43+
44+
- name: Release binaries
45+
run: ./scripts/release_binaries.sh --version=${{ steps.current_tag.outputs.tag }}
46+
47+
- name: Release new version
48+
uses: softprops/action-gh-release@v1
49+
with:
50+
tag_name: ${{ steps.current_tag.outputs.tag }}
51+
name: Vigil ${{ steps.current_tag.outputs.tag }}
52+
body: "⚠️ Changelog not yet provided."
53+
files: ./${{ steps.current_tag.outputs.tag }}-*.tar.gz
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
57+
build-docker:
58+
runs-on: ubuntu-latest
59+
60+
steps:
61+
- name: Checkout code
62+
uses: actions/checkout@v2
63+
64+
- name: Acquire Docker image metadata
65+
id: metadata
66+
uses: docker/metadata-action@v4
67+
with:
68+
images: valeriansaliou/vigil
69+
70+
- name: Login to Docker Hub
71+
uses: docker/login-action@v2
72+
with:
73+
username: ${{ secrets.DOCKERHUB_USERNAME }}
74+
password: ${{ secrets.DOCKERHUB_TOKEN }}
75+
76+
- name: Build and push Docker image
77+
uses: docker/build-push-action@v3
78+
with:
79+
context: .
80+
tags: ${{ steps.metadata.outputs.tags }}
81+
labels: ${{ steps.metadata.outputs.labels }}
82+
push: true

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Vigil
22
=====
33

4-
[![Test and Build](https://github.com/valeriansaliou/vigil/workflows/Test%20and%20Build/badge.svg?branch=master)](https://github.com/valeriansaliou/vigil/actions?query=workflow%3A%22Test+and+Build%22) [![dependency status](https://deps.rs/repo/github/valeriansaliou/vigil/status.svg)](https://deps.rs/repo/github/valeriansaliou/vigil) [![Buy Me A Coffee](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://www.buymeacoffee.com/valeriansaliou)
4+
[![Test and Build](https://github.com/valeriansaliou/vigil/workflows/Test%20and%20Build/badge.svg?branch=master)](https://github.com/valeriansaliou/vigil/actions?query=workflow%3A%22Test+and+Build%22) [![Build and Release](https://github.com/valeriansaliou/vigil/workflows/Build%20and%20Release/badge.svg)](https://github.com/valeriansaliou/vigil/actions?query=workflow%3A%22Build+and+Release%22) [![dependency status](https://deps.rs/repo/github/valeriansaliou/vigil/status.svg)](https://deps.rs/repo/github/valeriansaliou/vigil) [![dependency status](https://deps.rs/repo/github/valeriansaliou/vigil/status.svg)](https://deps.rs/repo/github/valeriansaliou/vigil) [![Buy Me A Coffee](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://www.buymeacoffee.com/valeriansaliou)
55

66
**Microservices Status Page. Monitors a distributed infrastructure and sends alerts (Slack, SMS, etc.).**
77

0 commit comments

Comments
 (0)