Skip to content

Commit

Permalink
update workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
paderlol committed Apr 14, 2023
1 parent 125bd1b commit cd6bbed
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
49 changes: 48 additions & 1 deletion .github/workflows/build&push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,51 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: ${{steps.version_step.outputs.version}}
build-args: ${{steps.version_step.outputs.version}}

push_to_multi_platforms_registry:
name: Push Docker slim image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Extract Version
id: version_step
run: |
echo "##[set-output name=version;]NACOS_VERSION=${GITHUB_REF#$"refs/tags/v"}"
- name: Check out the repo
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: nacos/nacos-server
flavor: |
latest=false
tags: |
type=pep440,pattern=v{{version}}-slim
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: build
platforms: linux/amd64,linux/arm64
file: build/Dockerfile.Slim
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: ${{steps.version_step.outputs.version}}
2 changes: 1 addition & 1 deletion build/Dockerfile.Slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM amd64/buildpack-deps:buster-curl as installer

ARG NACOS_VERSION=2.0.4
ARG NACOS_VERSION=1.4.5
ARG HOT_FIX_FLAG=""

RUN set -x \
Expand Down

0 comments on commit cd6bbed

Please sign in to comment.