Skip to content

SDK (js import)

SDK (js import) #87

name: Build docker image and publish
on:
push:
branches:
- main
env:
REGISTRY: docker.io
IMAGE_NAME: laoshanxi/appmesh-ui
APPMESH_VERSION: "2.1.2"
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout Github code
uses: actions/checkout@v4
# Updated to the latest stable version
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
no-cache: true
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.APPMESH_VERSION }}