forked from kubernetes-sigs/cluster-api-provider-aws
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes for spectro-release image build
- Loading branch information
1 parent
be7d9ad
commit 23a2ed1
Showing
3 changed files
with
123 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Spectro Release | ||
run-name: Release for Cluster API AWS ${{ github.event.inputs.release_version }} | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_version: | ||
description: 'Cluster API Version to Build' | ||
required: true | ||
default: '0.0.0' | ||
rel_type: | ||
type: choice | ||
description: Type of release | ||
options: | ||
- release | ||
- rc | ||
jobs: | ||
builder: | ||
# edge-runner machine group is a bunch of machines in US Datacenter | ||
runs-on: ubuntu-latest | ||
# Initialize all secrets required for the job | ||
# Ensure that the credentials are provided as encrypted secrets | ||
env: | ||
SPECTRO_VERSION: ${{ github.event.inputs.release_version }} | ||
LEGACY_REGISTRY: gcr.io/spectro-images-public/release/cluster-api-aws | ||
FIPS_REGISTRY: gcr.io/spectro-images-public/release-fips/cluster-api-aws | ||
steps: | ||
- | ||
uses: mukunku/[email protected] | ||
id: checkTag | ||
with: | ||
tag: v${{ github.event.inputs.release_version }}-spectro | ||
- | ||
if: ${{ steps.checkTag.outputs.exists == 'true' }} | ||
run: | | ||
echo "Tag already exists for v${{ github.event.inputs.release_version }}-spectro..." | ||
exit 1 | ||
- | ||
if: ${{ github.event.inputs.rel_type == 'rc' }} | ||
run: | | ||
echo "LEGACY_REGISTRY=gcr.io/spectro-dev-public/release/cluster-api-aws" >> $GITHUB_ENV | ||
echo "FIPS_REGISTRY=gcr.io/spectro-dev-public/release-fips/cluster-api-aws" >> $GITHUB_ENV | ||
- | ||
uses: actions/checkout@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- | ||
name: Login to private registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ secrets.REGISTRY_URL }} | ||
username: ${{ secrets.REGISTRY_USERNAME }} | ||
password: ${{ secrets.REGISTRY_PASSWORD }} | ||
- | ||
name: Build Image | ||
env: | ||
REGISTRY: ${{ env.LEGACY_REGISTRY }} | ||
run: | | ||
make docker-build-all | ||
make docker-push-all | ||
- | ||
name: Build Image - FIPS Mode | ||
env: | ||
FIPS_ENABLE: yes | ||
REGISTRY: ${{ env.FIPS_REGISTRY }} | ||
run: | | ||
make docker-build-all | ||
make docker-push-all | ||
- | ||
name: Create Release | ||
if: ${{ github.event.inputs.rel_type == 'release' }} | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ github.event.inputs.release_version }}-spectro | ||
release_name: Release v${{ github.event.inputs.release_version }}-spectro | ||
body: | | ||
Release version v${{ github.event.inputs.release_version }}-spectro | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters