Add Deploy GH Actions

Signed-off-by: Tyler Auerbeck <tauerbec@redhat.com>
pull/9989/head
Tyler Auerbeck 4 years ago
parent efe2638f87
commit aa0ef890d0

@ -3,6 +3,10 @@ on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
@ -27,3 +31,31 @@ jobs:
run: make test-style
- name: Run unit tests
run: make test-coverage
canary-release:
runs-on: ubuntu-latest
needs: build
env:
AZURE_STORAGE_CONNECTION_STRING: "${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}"
AZURE_STORAGE_CONTAINER_NAME: "${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}"
VERSION: canary
if: ${{ github.event }} == "push" && github.ref == 'refs/heads/main'
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
- name: Build Helm Binaries
run: |
make build-cross
make dist checksum VERSION="${VERSION}"
- name: Azure CLI Action
uses: Azure/cli@1.0.4
with:
inlineScript: |
az storage blob upload-batch -s _dist/ -d "$AZURE_STORAGE_CONTAINER_NAME" --pattern 'helm-*' --connection-string "$AZURE_STORAGE_CONNECTION_STRING"

@ -0,0 +1,47 @@
name: release
on:
create:
tags:
- v*
workflow_dispatch:
inputs:
version:
description: Version
required: true
jobs:
release:
runs-on: ubuntu-latest
env:
AZURE_STORAGE_CONNECTION_STRING: "${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}"
AZURE_STORAGE_CONTAINER_NAME: "${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}"
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
- name: Set Version (tag event)
run: |
echo "::set-output name=VERSION::${GITHUB_REF##*/}"
if: github.event == "create"
- name: Set Version (dispatch event)
run: |
echo "::set-output name=VERSION::${{ github.event.inputs.version }}"
if: github.event == "workflow_dispatch"
- name: Build Helm Binaries
run: |
make build-cross
make dist checksum VERSION="${VERSION}"
- name: Azure CLI Action
uses: Azure/cli@1.0.4
with:
inlineScript: |
az storage blob upload-batch -s _dist/ -d "$AZURE_STORAGE_CONTAINER_NAME" --pattern 'helm-*' --connection-string "$AZURE_STORAGE_CONNECTION_STRING"
Loading…
Cancel
Save