-
-
Notifications
You must be signed in to change notification settings - Fork 19
53 lines (46 loc) · 1.51 KB
/
dockerbuild.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: Docker Build
on:
push:
branches:
- master
pull_request:
release:
types:
- created
jobs:
build-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/[email protected]
- uses: docker/[email protected]
- name: Login to dockerhub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- id: docker_meta
uses: docker/metadata-action@v4
with:
images: moscajs/aedes
tags: |
type=semver,pattern={{version}}
type=sha
type=ref,event=branch
label-custom: |
org.opencontainers.image.vendor=moscajs
org.opencontainers.image.documentation=https://github.com/moscajs/aedes-cli
org.opencontainers.image.authors=Daniel Lando <[email protected]>
org.opencontainers.image.url=https://github.com/moscajs/aedes-cli
maintainer=robertsLando
- name: build+push
uses: docker/build-push-action@v3
with:
platforms: linux/arm64,linux/amd64,linux/arm/v6,linux/arm/v7
context: .
file: docker/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}