mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-13 05:31:28 -07:00
27
.github/workflows/docker_prod.yml
vendored
27
.github/workflows/docker_prod.yml
vendored
@@ -6,7 +6,6 @@
|
|||||||
# GitHub recommends pinning actions to a commit SHA.
|
# GitHub recommends pinning actions to a commit SHA.
|
||||||
# To get a newer version, you will need to update the SHA.
|
# To get a newer version, you will need to update the SHA.
|
||||||
# You can also reference a tag or branch, but the action may change without warning.
|
# You can also reference a tag or branch, but the action may change without warning.
|
||||||
|
|
||||||
name: Publish Docker image
|
name: Publish Docker image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -14,6 +13,7 @@ on:
|
|||||||
types: [published]
|
types: [published]
|
||||||
tags:
|
tags:
|
||||||
- '*.[1-9]+[0-9]?.[1-9]+*'
|
- '*.[1-9]+[0-9]?.[1-9]+*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -21,6 +21,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -31,42 +32,39 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Set up dynamic build ARGs
|
# --- Get release version from tag
|
||||||
id: getargs
|
|
||||||
run: echo "version=$(cat ./stable/VERSION)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Get release version
|
- name: Get release version
|
||||||
id: get_version
|
id: get_version
|
||||||
run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
|
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
# --- Write version to .VERSION file
|
||||||
- name: Create .VERSION file
|
- name: Create .VERSION file
|
||||||
run: echo "${{ steps.get_version.outputs.version }}" >> .VERSION
|
run: echo "${{ steps.get_version.outputs.version }}" > .VERSION
|
||||||
|
|
||||||
|
# --- Generate Docker metadata and tags
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v4
|
||||||
with:
|
with:
|
||||||
# list of Docker images to use as base name for tags
|
|
||||||
images: |
|
images: |
|
||||||
ghcr.io/jokob-sk/netalertx
|
ghcr.io/jokob-sk/netalertx
|
||||||
jokobsk/netalertx
|
jokobsk/netalertx
|
||||||
# generate Docker tags based on the following events/attributes
|
|
||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}},value=${{ inputs.version }}
|
type=semver,pattern={{version}},value=${{ steps.get_version.outputs.version }}
|
||||||
type=semver,pattern={{major}}.{{minor}},value=${{ inputs.version }}
|
type=semver,pattern={{major}}.{{minor}},value=${{ steps.get_version.outputs.version }}
|
||||||
type=semver,pattern={{major}},value=${{ inputs.version }}
|
type=semver,pattern={{major}},value=${{ steps.get_version.outputs.version }}
|
||||||
type=ref,event=branch,suffix=-{{ sha }}
|
type=ref,event=branch,suffix=-{{ sha }}
|
||||||
type=ref,event=pr
|
type=ref,event=pr
|
||||||
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
|
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
|
||||||
- name: Log in to Github Container registry
|
- name: Log in to Github Container Registry (GHCR)
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: jokob-sk
|
username: jokob-sk
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Log in to DockerHub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -81,6 +79,5 @@ jobs:
|
|||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
# # ⚠ disable cache if build is failing to download debian packages
|
|
||||||
# cache-from: type=registry,ref=ghcr.io/jokob-sk/netalertx:buildcache
|
# cache-from: type=registry,ref=ghcr.io/jokob-sk/netalertx:buildcache
|
||||||
# cache-to: type=registry,ref=ghcr.io/jokob-sk/netalertx:buildcache,mode=max
|
# cache-to: type=registry,ref=ghcr.io/jokob-sk/netalertx:buildcache,mode=max
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
# NetAlertX - Network, presence scanner and alert framework
|
# NetAlertX - Network, presence scanner and alert framework
|
||||||
|
|
||||||
Get visibility of what's going on on your WIFI/LAN network and enable presence detection of important devices. Schedule scans for devices, port changes and get alerts if unknown devices or changes are found. Write your own [Plugin](https://github.com/jokob-sk/NetAlertX/tree/main/docs/PLUGINS.md#readme) with auto-generated UI and in-build notification system. Build out and easily maintain your network source of truth (NSoT).
|
Get visibility of what's going on on your WIFI/LAN network and enable presence detection of important devices. Schedule scans for devices, port changes and get alerts if unknown devices or changes are found. Write your own [Plugin](https://github.com/jokob-sk/NetAlertX/tree/main/docs/PLUGINS.md#readme) with auto-generated UI and in-build notification system. Build out and easily maintain your network source of truth (NSoT) and device inventory.
|
||||||
|
|
||||||
## 📋 Table of Contents
|
## 📋 Table of Contents
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user