Skip to content

Release Che Docs

Release Che Docs #81

Workflow file for this run

#
# Copyright (c) 2024 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Perform release of Che Docs
name: Release Che Docs
on:
workflow_dispatch:
inputs:
version:
description: 'The version that is going to be released. Should be in format 7.y.z'
required: true
default: ''
forceRecreateTags:
description: If true, tags will be recreated. Use with caution
required: false
default: 'false'
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
# - name: Check existing tags
# run: |
# set +e
# RECREATE_TAGS=${{ github.event.inputs.forceRecreateTags }}
# git ls-remote --exit-code origin refs/tags/${{ github.event.inputs.version}}
# TAG_EXISTS=$?
# if [[ $TAG_EXISTS -eq 0 ]]; then
# if [[ $RECREATE_TAGS == "true" ]]; then
# echo "[INFO] Recreating tags for ${{ github.event.inputs.version}} version"
# git push origin :${{ github.event.inputs.version}}
# else
# echo "[ERROR] Cannot proceed with release - tag already exists"
# fi
# fi
- name: Set up yq
run: |
python -m pip install --upgrade pip
pip install yq
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to quay.io
uses: docker/login-action@v2
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: quay.io
- name: Publish release image
run: |
git checkout ${{ github.event.inputs.version }}
SHORT_SHA1=$(git rev-parse --short=7 HEAD)
docker buildx build --platform linux/amd64 -f Containerfile --push -t quay.io/eclipse/che-docs:${SHORT_SHA1} -t quay.io/eclipse/che-docs:${{ github.event.inputs.version }} .