forked from frappe/frappe_docker
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (48 loc) · 1.36 KB
/
erpnext14-bubbles.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: ERPNext14-bubbles
on:
workflow_dispatch: #github页面手动触发
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@v2
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