Skip to content

build: Build multi-arch (linux/amd64, linux/arm64) image using buildx #19

build: Build multi-arch (linux/amd64, linux/arm64) image using buildx

build: Build multi-arch (linux/amd64, linux/arm64) image using buildx #19

Workflow file for this run

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: Generate GitHub release artifacts
# See note on make variables, above.
run: |
make release-manifests \
--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: Upload GitHub release artifacts
run: |
gh release upload ${{ env.version }} \
metadata.yaml \
templates/infrastructure-components.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}