Skip to content

Commit

Permalink
image add new label
Browse files Browse the repository at this point in the history
  • Loading branch information
ARC-MX committed Jan 3, 2025
1 parent 8dcc9a4 commit 2452a00
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 70 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,27 @@ jobs:

- name: Build and push Docker image
run: |
PLATFORMS=linux/arm64,linux/amd64
ARCH_TAGS="arm64 amd64"
DOCKER_IMAGE=arcw/sgcc_electricity
docker buildx build --build-arg VERSION=${{ inputs.username }} --platform $PLATFORMS -t $DOCKER_IMAGE:latest -t $DOCKER_IMAGE:${{ inputs.username }} --file Dockerfile-for-github-action --push .
for ARCH in $ARCH_TAGS; do
if [ "$ARCH" == "arm64" ]; then
TAG_ARCH="aarch64"
else
TAG_ARCH=$ARCH
fi
docker buildx build --build-arg VERSION=${{ inputs.username }} --platform linux/$ARCH -t $DOCKER_IMAGE-$TAG_ARCH:latest -t $DOCKER_IMAGE:latest -t $DOCKER_IMAGE:${{ inputs.username }} --file Dockerfile-for-github-action --push .
done
- name: Log into Aliyun hub registry and push Docker image
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.ALIYUN_USERNAME }} --password-stdin registry.cn-hangzhou.aliyuncs.com
PLATFORMS=linux/arm64,linux/amd64
ARCH_TAGS="arm64 amd64"
DOCKER_IMAGE=registry.cn-hangzhou.aliyuncs.com/arcw/sgcc_electricity
docker buildx build --build-arg VERSION=${{ inputs.username }} --platform $PLATFORMS -t $DOCKER_IMAGE:latest -t $DOCKER_IMAGE:${{ inputs.username }} --file Dockerfile-for-github-action --push .
for ARCH in $ARCH_TAGS; do
if [ "$ARCH" == "arm64" ]; then
TAG_ARCH="aarch64"
else
TAG_ARCH=$ARCH
fi
docker buildx build --build-arg VERSION=${{ inputs.username }} --platform linux/$ARCH -t $DOCKER_IMAGE-$TAG_ARCH:latest -t $DOCKER_IMAGE:latest -t $DOCKER_IMAGE:${{ inputs.username }} --file Dockerfile-for-github-action --push .
done
7 changes: 0 additions & 7 deletions Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions build.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ host_network: true
startup: application
boot: auto
init: false
#image: "{arch}-sgcc_electricity_new"
image: "registry.cn-hangzhou.aliyuncs.com/arcw/sgcc_electricity-{arch}"
map:
- config:rw
options:
Expand Down
51 changes: 0 additions & 51 deletions run.sh

This file was deleted.

0 comments on commit 2452a00

Please sign in to comment.