Skip to content

ci: build and push images at release to mesosphere registry #20

ci: build and push images at release to mesosphere registry

ci: build and push images at release to mesosphere registry #20

Workflow file for this run

name: release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
permissions:
contents: write # Allow to create a release.
jobs:
build:
name: create draft release
runs-on: ubuntu-latest
steps:
- name: Set env
run: echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: checkout code
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # tag=v3.5.0
with:
fetch-depth: 0
- name: Calculate go version
run: echo "go_version=$(make go-version)" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # tag=v3.5.0
with:
go-version: ${{ env.go_version }}
- name: generate release artifacts
run: |
export REGISTRY=docker.io/mesosphere
export PROD_REGISTRY=$REGISTRY
export STAGING_REGISTRY=$REGISTRY
export TAG=${{ env.RELEASE_TAG }}
make release
- name: Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # tag=v1
with:
draft: true
files: out/*
body: "TODO: Copy release notes shared by the comms team"
- name: Login to Dockerhub Registry
uses: docker/login-action@v2
with:
username: ${{ secrets.NEXUS_USERNAME }}
password: ${{ secrets.NEXUS_PASSWORD }}
- name: Build and push docker images
run: |
export REGISTRY=docker.io/mesosphere
export PROD_REGISTRY=$REGISTRY
export STAGING_REGISTRY=$REGISTRY
export TAG=${{ env.RELEASE_TAG }}
make ALL_ARCH="amd64 arm64" docker-build-all
make ALL_ARCH="amd64 arm64" docker-push-all