Add release automation for image tags

Relates-To: #13
Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Change-Id: Iecfc6e4ddf456ec2bd5269829fbbf6ea9024ce83
This commit is contained in:
Sean Eagan 2021-03-31 14:57:55 -05:00 committed by Sean Eagan
parent 7ed1e8548d
commit 2a5218c52a
1 changed files with 44 additions and 0 deletions

44
.github/workflows/release.yaml vendored Normal file
View File

@ -0,0 +1,44 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: release
# Expects git tags semver format e.g. v1.2.3
on:
push:
tags:
- 'v*'
jobs:
release-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to image registry
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Publish semver image tags
run: |
set -x
set -e
export IMAGE_TAG=$(echo "${TAG_REF}" | sed -e 's|refs/tags/||')
export COMMIT="$COMMIT"
export PUSH_IMAGE="true"
make images
env:
TAG_REF: ${{ github.ref }}
COMMIT: ${{ github.sha }}