-
Notifications
You must be signed in to change notification settings - Fork 51
52 lines (48 loc) · 1.32 KB
/
release.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
49
50
51
52
name: hakatime
on:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
setup-tags:
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.docker-tags.outputs.tags }}
labels: ${{ steps.docker-tags.outputs.labels }}
json: ${{ steps.docker-tags.outputs.json }}
steps:
- uses: actions/checkout@v3
- name: Docker tags
id: docker-tags
uses: docker/metadata-action@v4
with:
images: |
docker.io/mujx/hakatime
tags: |
type=semver,pattern=v{{version}}
push:
runs-on: ubuntu-latest
needs:
- setup-tags
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
registry: docker.io
username: mujx
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Docker build and push
uses: docker/build-push-action@v4
with:
file: ./Dockerfile
push: true
context: ./
tags: ${{ needs.setup-tags.outputs.tags }}
labels: ${{ needs.setup-tags.outputs.labels }}