Use HTTP response status code to check gitlab repositories accessibil… #472
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
# | |
# Copyright (c) 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 | |
# | |
name: build-next | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
cache: 'maven' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Login to docker.io | |
uses: redhat-actions/podman-login@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
registry: docker.io | |
- name: Login to quay.io | |
uses: redhat-actions/podman-login@v1 | |
with: | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
registry: quay.io | |
- name: Build with Maven | |
run: mvn -B clean install -U -Pintegration | |
- name: Build and push images | |
id: build | |
run: | | |
echo "short_sha1=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
./build/build.sh --tag:next --sha-tag --build-platforms:linux/amd64,linux/ppc64le,linux/arm64 --builder:podman --push-image | |
- name: Create failure MM message | |
if: ${{ failure() }} | |
run: | | |
echo "{\"text\":\":no_entry_sign: Next Che Server build has failed: https://github.com/eclipse-che/che-server/actions/workflows/next-build.yml\"}" > mattermost.json | |
- name: Send MM message | |
if: ${{ failure() }} | |
uses: mattermost/action-mattermost-notify@1.1.0 | |
env: | |
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} | |
MATTERMOST_CHANNEL: eclipse-che-ci | |
MATTERMOST_USERNAME: che-bot |