mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew
synced 2026-01-12 00:02:38 +08:00
Update docker build to push version tags
This commit is contained in:
@@ -26,7 +26,7 @@ jobs:
|
||||
- name: Extract version from Cargo.toml
|
||||
shell: bash
|
||||
run: |
|
||||
echo "EW_VERSION=$(grep "^version" Cargo.toml | sed -E 's/version\s*=\s*["]([^"]*)["]/\1/')" >> $GITHUB_ENV
|
||||
echo "APP_VERSION=$(grep "^version" Cargo.toml | sed -E 's/version\s*=\s*["]([^"]*)["]/\1/')" >> $GITHUB_ENV
|
||||
|
||||
- name: Log in to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
@@ -52,10 +52,12 @@ jobs:
|
||||
push: true
|
||||
labels: |
|
||||
gitsha1=${{ github.sha }}
|
||||
org.opencontainers.image.version=${{ env.EW_VERSION }}
|
||||
tags: "${{ steps.set-tag.outputs.tags }}"
|
||||
org.opencontainers.image.version=${{ env.APP_VERSION }}
|
||||
tags: |
|
||||
${{ steps.set-tag.outputs.tags }}
|
||||
docker.io/ethanaobrien/ew:${{ env.APP_VERSION }}
|
||||
file: "docker/Dockerfile"
|
||||
platforms: linux/amd64 #,linux/arm64
|
||||
platforms: linux/amd64, linux/arm64
|
||||
|
||||
# arm64 builds OOM without the git fetch setting. c.f.
|
||||
# https://github.com/rust-lang/cargo/issues/10583
|
||||
|
||||
Reference in New Issue
Block a user