Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/gh_actions_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ jobs:
with:
file: build/dockerfiles/Dockerfile
platforms: linux/amd64,linux/arm64
push: false
push: true
tags: quay.io/eclipse/che-machine-exec:pr-check

48 changes: 48 additions & 0 deletions .github/workflows/next-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#
# Copyright (c) 2019-2021 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
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#

name: Machine Exec Next Build

on:
workflow_dispatch:
inputs:
push:
branches: [ main ]
jobs:
build-push:
runs-on: ubuntu-22.04
steps:
- name: Checkout che-machine-exec source code
uses: actions/checkout@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to quay.io
uses: docker/login-action@v4
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: quay.io
- id: vars
shell: bash
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build and push both short SHA tag and next tag
uses: docker/build-push-action@v7
with:
file: build/dockerfiles/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
quay.io/eclipse/che-machine-exec:next
quay.io/eclipse/che-machine-exec:${{ steps.vars.outputs.sha_short }}

83 changes: 83 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#
# Copyright (c) 2019-2023 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
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#

name: Release Che Machine Exec

on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
version:
description: 'The version that is going to be released. Should be in format 7.y.z'
required: true
noCommit:
description: 'If true, will not commit the version bump changes'
default: ''
forceRecreateTags:
description: If true, tags will be recreated. Use with caution
required: false
default: 'false'
jobs:
build:
name: Create Release
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check existing tags
run: |
set +e
RECREATE_TAGS=${{ github.event.inputs.forceRecreateTags }}
VERSION=${{ github.event.inputs.version }}
EXISTING_TAG=$(git ls-remote --exit-code origin refs/tags/${VERSION})
if [[ -n ${EXISTING_TAG} ]]; then
if [[ ${RECREATE_TAGS} == "true" ]]; then
echo "[INFO] Removing tag for ${VERSION} version. New tag will be recreated during release."
git push origin :$VERSION
else
echo "[ERROR] Cannot proceed with release - tag ${EXISTING_TAG} already exists."
exit 1
fi
else
echo "[INFO] No existing tags detected for $VERSION"
fi
- name: Login to docker.io
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
registry: docker.io
- name: Login to quay.io
uses: docker/login-action@v4
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: quay.io
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Create Release
run: |
git config --global user.name "Mykhailo Kuznietsov"
git config --global user.email "mkuznets@redhat.com"
git config --global pull.rebase true
export GITHUB_TOKEN=${{ secrets.CHE_BOT_GITHUB_TOKEN }}
NO_COMMIT=${{ github.event.inputs.noCommit}}
if [[ $NO_COMMIT == "true" ]]; then
NO_COMMIT="--no-commit"
else
NO_COMMIT=
fi
/bin/bash make-release.sh --version ${{ github.event.inputs.version }} --trigger-release $NO_COMMIT
2 changes: 1 addition & 1 deletion build/dockerfiles/rhel.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#

# https://registry.access.redhat.com/ubi8/go-toolset
FROM registry.access.redhat.com/ubi8/go-toolset:1.20.10-10 as builder
FROM registry.access.redhat.com/ubi8/go-toolset:1.26.5-1784141349 as builder
ENV GOPATH=/go/ \
CGO_ENABLED=1
USER root
Expand Down
Loading