-
Notifications
You must be signed in to change notification settings - Fork 8
37 lines (31 loc) · 1020 Bytes
/
image-push.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
name: build-image
on:
push:
branches:
- "*"
tags:
- "*" # run for tags
jobs:
build-image:
name: build-image
runs-on: ubuntu-latest
steps:
- name: checkout-repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 0
- name: dockerhub-login
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build-push-tag
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
with:
tags: mattermost/matterwick:${{ github.ref_name }}
push: ${{ startsWith(github.ref, 'refs/tags/') }}
- name: build-push-master
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
with:
tags: mattermost/matterwick:latest
push: ${{ startsWith(github.ref, 'refs/heads/master') }}