Skip to content

Commit 4246d4f

Browse files
authoredJun 27, 2022
Merge pull request umami-software#1227 from mikecao/dev
v1.33
2 parents f27959e + 3438716 commit 4246d4f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1337
-326
lines changed
 

‎.github/workflows/cd-manual.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Create docker images
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
type: string
8+
description: Version
9+
required: true
10+
add-latest:
11+
type: boolean
12+
description: Add latest tag
13+
required: false
14+
15+
jobs:
16+
build:
17+
name: Build, push, and deploy
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
matrix:
22+
db-type: [postgresql, mysql]
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- uses: mr-smithers-excellent/docker-build-push@v5
28+
name: Build & push Docker image for ${{ matrix.db-type }}
29+
with:
30+
image: umami
31+
tags: ${{ matrix.db-type }}-${{ inputs.version }}
32+
addLatest: ${{ inputs.add-latest }}
33+
buildArgs: DATABASE_TYPE=${{ matrix.db-type }}
34+
registry: ghcr.io/${{ github.actor }}
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}

‎.github/workflows/cd.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
name: Create docker images
22

3-
on:
4-
workflow_dispatch:
5-
inputs:
6-
version:
7-
type: string
8-
description: Version
9-
required: true
3+
on: [create]
104

115
jobs:
6+
127
build:
138
name: Build, push, and deploy
9+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
1410
runs-on: ubuntu-latest
1511

1612
strategy:
@@ -20,11 +16,14 @@ jobs:
2016
steps:
2117
- uses: actions/checkout@v2
2218

19+
- name: Set env
20+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
21+
2322
- uses: mr-smithers-excellent/docker-build-push@v5
2423
name: Build & push Docker image for ${{ matrix.db-type }}
2524
with:
2625
image: umami
27-
tags: ${{ matrix.db-type }}-${{ inputs.version }}
26+
tags: ${{ matrix.db-type }}-${{ env.RELEASE_VERSION }}, ${{ matrix.db-type }}-latest
2827
buildArgs: DATABASE_TYPE=${{ matrix.db-type }}
2928
registry: ghcr.io/${{ github.actor }}
3029
username: ${{ github.actor }}

0 commit comments

Comments
 (0)
Please sign in to comment.