Merge pull request #60 from kilosonc/feat/badge #93
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |