Skip to content

Commit 30c6cd9

Browse files
authored
Merge pull request #10 from spectrocloud/spectro-cicd1
spectro-cicd
2 parents 5e1d016 + dee4b1d commit 30c6cd9

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Spectro Release
2+
run-name: Release for Cluster API openstack ${{ github.event.inputs.release_version }}
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_version:
7+
description: 'Cluster API Version to Build'
8+
required: true
9+
default: '0.0.0'
10+
jobs:
11+
builder:
12+
# edge-runner machine group is a bunch of machines in US Datacenter
13+
runs-on: ubuntu-latest
14+
# Initialize all secrets required for the job
15+
# Ensure that the credentials are provided as encrypted secrets
16+
env:
17+
SPECTRO_VERSION: ${{ github.event.inputs.release_version }}
18+
steps:
19+
-
20+
uses: mukunku/[email protected]
21+
id: checkTag
22+
with:
23+
tag: v${{ github.event.inputs.release_version }}-spectro
24+
-
25+
if: ${{ steps.checkTag.outputs.exists == 'true' }}
26+
run: |
27+
echo "Tag already exists for v${{ github.event.inputs.release_version }}-spectro..."
28+
exit 1
29+
-
30+
uses: actions/checkout@v3
31+
-
32+
name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v1
34+
-
35+
name: Login to private registry
36+
uses: docker/login-action@v1
37+
with:
38+
registry: ${{ secrets.REGISTRY_URL }}
39+
username: ${{ secrets.REGISTRY_USERNAME }}
40+
password: ${{ secrets.REGISTRY_PASSWORD }}
41+
-
42+
name: Build Image
43+
env:
44+
REGISTRY: gcr.io/spectro-images-public/release/cluster-api-openstack
45+
run: |
46+
make docker-build
47+
make docker-push
48+
-
49+
name: Build Image - FIPS Mode
50+
env:
51+
FIPS_ENABLE: yes
52+
REGISTRY: gcr.io/spectro-images-public/release-fips/cluster-api-openstack
53+
run: |
54+
make docker-build
55+
make docker-push
56+
-
57+
name: Create Release
58+
id: create_release
59+
uses: actions/create-release@v1
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
tag_name: v${{ github.event.inputs.release_version }}-spectro
64+
release_name: Release v${{ github.event.inputs.release_version }}-spectro
65+
body: |
66+
Release version ${{ github.event.inputs.release_version }}
67+
draft: false
68+
prerelease: false

0 commit comments

Comments
 (0)