forked from absmach/magistrala-ui-old
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (29 loc) · 838 Bytes
/
build.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
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0
name: Create and publish a Docker image
on:
push:
branches: ["main"]
jobs:
build-and-push-image:
name: Build and push Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
cache-dependency-path: "go.sum"
- name: Set up Docker Build
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push Dockers
run: |
make latest