-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (44 loc) · 1.51 KB
/
go.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
53
54
55
56
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "master" ]
tags:
- v[0-9]+.[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Get branch name
uses: nelonoel/[email protected]
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker Login
uses: docker/[email protected]
with:
# Server address of Docker registry. If not set then will default to Docker Hub
# registry: 4pdosc
# Username used to log against the Docker registry
username: ${{ secrets.DOCKERHUB_TOKEN }}
# Password or personal access token used to log against the Docker registry
password: ${{ secrets.DOCKERHUB_PASSWD }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: projecthami/mock-device-plugin:latest
# - run: docker build . -t projecthami/mock-device-plugin:${BRANCH_NAME}
# - run: docker push projecthami/mock-device-plugin:${BRANCH_NAME}