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
|
- name: Extract version from Cargo.toml
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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
|
- name: Log in to DockerHub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@@ -39,9 +39,9 @@ jobs:
|
|||||||
uses: docker/metadata-action@master
|
uses: docker/metadata-action@master
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
docker.io/ethanaobrien/ew
|
docker.io/ethanaobrien/ew
|
||||||
flavor: |
|
flavor: |
|
||||||
latest=false
|
latest=false
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=latest
|
type=raw,value=latest
|
||||||
|
|
||||||
@@ -52,10 +52,12 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
labels: |
|
labels: |
|
||||||
gitsha1=${{ github.sha }}
|
gitsha1=${{ github.sha }}
|
||||||
org.opencontainers.image.version=${{ env.EW_VERSION }}
|
org.opencontainers.image.version=${{ env.APP_VERSION }}
|
||||||
tags: "${{ steps.set-tag.outputs.tags }}"
|
tags: |
|
||||||
|
${{ steps.set-tag.outputs.tags }}
|
||||||
|
docker.io/ethanaobrien/ew:${{ env.APP_VERSION }}
|
||||||
file: "docker/Dockerfile"
|
file: "docker/Dockerfile"
|
||||||
platforms: linux/amd64 #,linux/arm64
|
platforms: linux/amd64, linux/arm64
|
||||||
|
|
||||||
# arm64 builds OOM without the git fetch setting. c.f.
|
# arm64 builds OOM without the git fetch setting. c.f.
|
||||||
# https://github.com/rust-lang/cargo/issues/10583
|
# https://github.com/rust-lang/cargo/issues/10583
|
||||||
|
|||||||
Reference in New Issue
Block a user