mirror of
https://github.com/GyulyVGC/sniffnet.git
synced 2025-12-23 22:29:01 -05:00
update .dockerignore and docker.yml
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
/target
|
||||
.git
|
||||
.gitignore
|
||||
.github
|
||||
*.md
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
LICENSE-APACHE
|
||||
LICENSE-MIT
|
||||
*.sh
|
||||
.editorconfig
|
||||
.gitattributes
|
||||
# Ignore everything
|
||||
*
|
||||
|
||||
# Explicitly allow files
|
||||
!src/**/*.rs
|
||||
!build.rs
|
||||
!Cargo.toml
|
||||
!Cargo.lock
|
||||
!Dockerfile
|
||||
!services.txt
|
||||
!resources/countries_flags/**/*.svg
|
||||
!resources/DB/*.mmdb
|
||||
!resources/fonts/subset/*.ttf
|
||||
!resources/logos/raw/icon.png
|
||||
!resources/packaging/windows/graphics/sniffnet.ico
|
||||
!resources/sounds/*.mp3
|
||||
|
||||
56
.github/workflows/docker.yml
vendored
56
.github/workflows/docker.yml
vendored
@@ -8,36 +8,36 @@ jobs:
|
||||
name: Docker Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Extract version from Cargo.toml
|
||||
id: cargo-version
|
||||
run: |
|
||||
VERSION=$(grep -m1 "^version" Cargo.toml | cut -d'"' -f2)
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
- name: Extract version from Cargo.toml
|
||||
id: cargo-version
|
||||
run: |
|
||||
VERSION=v$(grep -m1 "^version" Cargo.toml | cut -d'"' -f2)
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GHCR_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}:latest
|
||||
ghcr.io/${{ github.repository }}:${{ env.VERSION }}
|
||||
ghcr.io/${{ github.repository }}:${{ github.sha }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}:latest
|
||||
ghcr.io/${{ github.repository }}:${{ env.VERSION }}
|
||||
ghcr.io/${{ github.repository }}:${{ github.sha }}
|
||||
|
||||
Reference in New Issue
Block a user