-
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
Showing
3 changed files
with
100 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,33 @@ | ||
--- | ||
name: "Build & publish artifacts" | ||
on: | ||
push | ||
|
||
|
||
jobs: | ||
publish_binaries: | ||
name: Build & publish artifacts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install nix | ||
uses: cachix/install-nix-action@v12 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- run: nix --extra-experimental-features nix-command --extra-experimental-features flakes build '.#static' | ||
|
||
- name: Upload syslog-client | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: syslog-client | ||
path: result/bin/syslog-client | ||
if-no-files-found: error | ||
|
||
- name: Upload syslog-server | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: syslog-server | ||
path: result/bin/syslog-server | ||
if-no-files-found: error |
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,38 @@ | ||
--- | ||
name: "Build & publish docker image" | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
|
||
jobs: | ||
publish_docker_image: | ||
name: Build & publish docker image to the GitHub container registry | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install nix | ||
uses: cachix/install-nix-action@v12 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
|
||
- name: Login to the container registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- run: nix --extra-experimental-features nix-command --extra-experimental-features flakes build '.#docker' | ||
- run: docker load <result | ||
- run: docker tag syslog-utils:latest ghcr.io/${IMAGE_NAME}:latest | ||
- run: docker tag syslog-utils:latest ghcr.io/${IMAGE_NAME}:${{ github.ref_name }} | ||
- run: docker push ghcr.io/${IMAGE_NAME}:latest |
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,29 @@ | ||
--- | ||
name: "Build & publish release binaries" | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
|
||
jobs: | ||
publish_binaries: | ||
name: Build & publish release binaries | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install nix | ||
uses: cachix/install-nix-action@v12 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- run: nix --extra-experimental-features nix-command --extra-experimental-features flakes build '.#static' | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: | | ||
result/bin/syslog-client | ||
result/bin/syslog-server | ||