Skip to content

rebase-release

rebase-release #702

#
# Copyright (c) 2021-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
#
name: rebase-release
# Trigger on demand or every 12 hour
on:
workflow_dispatch:
schedule:
- cron: "10 */12 * * *"
jobs:
rebase-release:
name: rebase
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.CHE_INCUBATOR_BOT_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Eclipse Che Sync"
- name: pickup-latest-release branch
run: |
LATEST_REMOTE_RELEASE_BRANCH=$(git branch -r --sort=-committerdate -l 'origin/1.*.x' | head -n 1 | tr -d '[:space:]')
LATEST_RELEASE_BRANCH=$(echo "${LATEST_REMOTE_RELEASE_BRANCH/origin\//}")
UPSTREAM_CODE_VERSION=$(sed 's|origin\/\(.*\).x|\1|' <<< "${LATEST_REMOTE_RELEASE_BRANCH}")
UPSTREAM_CODE_BRANCH="release/${UPSTREAM_CODE_VERSION}"
echo "Checkouting latest release branch ${LATEST_RELEASE_BRANCH}"
git checkout ${LATEST_RELEASE_BRANCH}
git remote add upstream-code https://github.com/microsoft/vscode
echo "Fetch the branch ${UPSTREAM_CODE_BRANCH} from upstream-code"
git fetch upstream-code ${UPSTREAM_CODE_BRANCH}
- name: rebase
run: |
./rebase.sh
- name: Validate tests on libc-ubi9 image
env:
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
docker buildx build --memory-swap -1 --memory 10g --platform linux/amd64 -f build/dockerfiles/linux-libc-ubi9.Dockerfile .
- name: push changes
run: |
set -e
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
git push origin ${CURRENT_BRANCH}