update docker.yml

This commit is contained in:
GyulyVGC 2025-05-03 11:09:30 +02:00
parent 73774e5c20
commit bec45cbde7

View file

@ -1,6 +1,9 @@
name: Docker
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
jobs:
@ -11,12 +14,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- 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: 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
@ -35,8 +38,8 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
push: true
tags: |
ghcr.io/gyulyvgc/sniffnet:latest
ghcr.io/gyulyvgc/sniffnet:${{ env.VERSION }}
ghcr.io/gyulyvgc/sniffnet:${{ github.ref_name }}