-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (106 loc) · 3.54 KB
/
general.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: general
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
runs-on: ubuntu-20.04
steps:
- name: Checkout source
id: source
uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # tag=v2
- name: Setup golang
id: golang
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # tag=v2
with:
go-version: 1.15
- name: Run generate
id: generate
run: make generate
- name: Run fmt
id: fmt
run: make fmt
- name: Run vet
id: vet
run: make vet
- name: Run staticcheck
id: staticcheck
run: make staticcheck
- name: Run lint
id: lint
run: make lint
- name: Run test
id: test
run: make test
- name: Run build
id: build
run: make build
docker:
runs-on: ubuntu-20.04
needs: tests
steps:
- name: Checkout source
id: source
uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # tag=v2
- name: Setup golang
id: golang
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # tag=v2
with:
go-version: 1.15
- name: Run generate
id: generate
run: make generate
- name: Run build
id: build
run: make build
- name: Image metadata
id: meta
uses: crazy-max/ghaction-docker-meta@9be43f076db7f0f4ac30d81183fc9d956b9e9eb6 # renovate: tag=v1
with:
images: proactcloud/vcloud-csi-driver
tag-latest: false
tag-custom: master
label-custom: |
maintainer=Proact Deutschland GmbH <devops@proactcloud.de>
org.opencontainers.image.title=vcloud-csi-driver
org.opencontainers.image.description=A Container Storage Interface (CSI) Driver for VMWare vCloud Director
org.opencontainers.image.vendor=Proact Deutschland GmbH
- name: Setup qemu
id: qemu
uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480 # renovate: tag=v1
- name: Setup buildx
id: buildx
uses: docker/setup-buildx-action@f211e3e9ded2d9377c8cadc4489a4e38014bc4c9 # tag=v1
- name: Docker login
id: login
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # tag=v1
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build image
id: publish
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a # tag=v2
with:
context: .
file: cmd/vcloud-csi-driver/Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
- name: Upload readme
id: readme
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # renovate: tag=v1
if: github.event_name != 'pull_request'
env:
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_PASS: ${{ secrets.DOCKERHUB_PASSWORD }}
with:
destination_container_repo: proactcloud/vcloud-csi-driver
provider: dockerhub
short_description: Docker images for VMWare vCloud Director CSI driver
readme_file: README.md