forked from vmware/cluster-api-provider-cloud-director
-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (68 loc) · 2.68 KB
/
release.yaml
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
name: Release
on:
push:
tags:
- 'v*-d2iq.*'
# Because variables are not exported, they are not visible by child processes, e.g. make
env:
registry: ghcr.io
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
# The repository follows the naming convention of other Cluster API providers.
repository: mesosphere/cluster-api-vcd-controller
version: ${{ github.ref_name }}
jobs:
release:
name: Release
runs-on:
# For a list of pre-installed software, see https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md
- ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
cache: true # cache go action in github actions cache store.
- name: Login to container registry
uses: docker/login-action@v2
with:
registry: ${{ env.registry }}
username: ${{ env.registry_username }}
password: ${{ env.registry_password }}
- name: Build multi-arch container image, and push to container registry
# Note: We set make variables using positional arguments (to the right of the make command), not environment
# variables (to the left of the make command). While make converts environment variables to make variables, the
# conversion is not straightforward. For example, conditional assignments are not overriden by environment
# variables.
run: |
make push-capvcd-image \
--makefile d2iq.Makefile \
REGISTRY=${{ env.registry }} \
CAPVCD_IMG=${{ env.repository }} \
VERSION=${{ env.version }}
# - name: Create (draft) GitHub release
# run: |
# gh release create ${{ env.version }} \
# --title ${{ env.version }} \
# --draft
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Generate release artifacts, and attach them to the GitHub release
# # Because steps do not share data, the artifacts must be generated and
# # uploaded in one step.
# #
# # Also see note on make variables, above.
# run: |
# make release-manifests \
# --makefile d2iq.Makefile \
# REGISTRY=${{ env.registry }} \
# CAPVCD_IMG=${{ env.repository }} \
# VERSION=${{ env.version }}
# gh release upload \
# --clobber \
# ${{ env.version }} \
# metadata.yaml \
# templates/infrastructure-components.yaml
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}