mirror of
https://github.com/elseif/MikroTikPatch
synced 2026-07-17 10:39:40 +00:00
Add IMAGE variable for Docker build process
Signed-off-by: elseif <elseif@live.cn>
This commit is contained in:
parent
db0273d518
commit
e4138453e1
6
.github/workflows/build_docker.yml
vendored
6
.github/workflows/build_docker.yml
vendored
@ -20,7 +20,6 @@ on:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build:
|
Build:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
@ -28,6 +27,7 @@ jobs:
|
|||||||
TZ: 'Asia/Shanghai'
|
TZ: 'Asia/Shanghai'
|
||||||
CHANNEL: ${{ inputs.channel }}
|
CHANNEL: ${{ inputs.channel }}
|
||||||
VERSION: ${{ inputs.version }}
|
VERSION: ${{ inputs.version }}
|
||||||
|
IMAGE: "ghcr.io/${{ github.repository_owner }}/chr"
|
||||||
steps:
|
steps:
|
||||||
- name: Check Version
|
- name: Check Version
|
||||||
id: version
|
id: version
|
||||||
@ -40,7 +40,7 @@ jobs:
|
|||||||
echo "Latest version: $VERSION"
|
echo "Latest version: $VERSION"
|
||||||
fi
|
fi
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
IMAGE=$(echo "ghcr.io/${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
|
|
||||||
echo "IMAGE=$IMAGE" >> $GITHUB_ENV
|
echo "IMAGE=$IMAGE" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Download CHR image
|
- name: Download CHR image
|
||||||
@ -176,6 +176,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
|
--provenance=false \
|
||||||
--push \
|
--push \
|
||||||
--output=type=image,push-by-digest=true,name=${IMAGE} \
|
--output=type=image,push-by-digest=true,name=${IMAGE} \
|
||||||
--metadata-file amd64.json \
|
--metadata-file amd64.json \
|
||||||
@ -185,6 +186,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/arm64 \
|
--platform linux/arm64 \
|
||||||
|
--provenance=false \
|
||||||
--push \
|
--push \
|
||||||
--output=type=image,push-by-digest=true,name=${IMAGE} \
|
--output=type=image,push-by-digest=true,name=${IMAGE} \
|
||||||
--metadata-file arm64.json \
|
--metadata-file arm64.json \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user