Skip to content

Merge pull request #57 from xuzhu-591/feat-approval #85

Merge pull request #57 from xuzhu-591/feat-approval

Merge pull request #57 from xuzhu-591/feat-approval #85

Workflow file for this run

name: Build Image
on:
push:
tags:
- v*
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
flavor: |
latest=false
images: |
${{ secrets.DOCKERHUB_USERNAME }}/horizon-web
registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALIREGISTRY_NAMESPACE }}/horizon-web
tags: |
type=sha,prefix={{branch}}-,enable=${{ github.ref_type == 'branch' }}
type=ref,event=tag
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Ali Container Registry
uses: docker/login-action@v2
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALIREGISTRY_USERNAME }}
password: ${{ secrets.ALIREGISTRY_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}