Skip to content

ERPNext14-bubbles

ERPNext14-bubbles #43

name: ERPNext14-bubbles
on:
workflow_dispatch: #github页面手动触1发
push:
tags:
- "v*.*"
env:
IMAGE_NAME: erpnext14 #这是您的镜像名
jobs:
get-tags:
runs-on: ubuntu-20.04
env:
TZ: Asia/Shanghai
outputs:
tags: ${{ steps.set-output-id.outputs.tags }}
steps:
- uses: actions/[email protected]
- name: set-output
id: set-output-id
run: |
VERSION=bubbles
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
fi
echo ::set-output name=tags::${VERSION}
push-docker-hub:
needs: get-tags
runs-on: ubuntu-20.04
env:
TZ: Asia/Shanghai
steps:
- uses: actions/checkout@v2
- name: Login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build && Push
uses: docker/build-push-action@v5
with:
context: .
file: ./erpnext14/Dockerfile-bubbles
secrets: |
GIT_AUTH_TOKEN=${{ secrets.GH_TOKEN }}
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ needs.get-tags.outputs.tags }}
# ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest