Version 1.1.2 of Iter8 #22
Workflow file for this run
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
name: Release binaries and Docker image | |
# Runs when a release is published | |
# Build and publish binaries and release Docker image | |
# | |
# NOTE: completion of this task will trigger verifyuserexperience.yaml | |
# which will test the released image (with released charts) | |
on: | |
release: | |
types: [published] | |
jobs: | |
build-and-push: | |
name: Push Iter8 image to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get version | |
run: | | |
tagref=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
# Strip "v" prefix from tagref | |
echo "VERSION=$(echo $tagref | sed -e 's/^v//')" >> $GITHUB_ENV | |
echo "MAJOR_MINOR_VERSION=$(echo $tagref | sed -e 's/^v//' -e 's,\([0-9]*\.[0-9]*\)\.\([0-9]*\),\1,')" >> $GITHUB_ENV | |
- name: Get owner | |
run: | | |
ownerrepo=${{ github.repository }} | |
owner=$(echo $ownerrepo | cut -f1 -d/) | |
if [[ "$owner" == "iter8-tools" ]]; then | |
owner=iter8 | |
fi | |
echo "OWNER=$owner" >> $GITHUB_ENV | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_SECRET }} | |
- uses: docker/build-push-action@v5 | |
with: | |
file: docker/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ env.OWNER }}/iter8:${{ env.VERSION }},${{ env.OWNER }}/iter8:${{ env.MAJOR_MINOR_VERSION }},${{ env.OWNER }}/iter8:latest | |
push: true | |
build-args: | | |
TAG=v${{ env.VERSION }} |