Skip to content

Add note about github-secrets-generator for uploading secrets to new … #54

Add note about github-secrets-generator for uploading secrets to new …

Add note about github-secrets-generator for uploading secrets to new … #54

Workflow file for this run

#
# Copyright (c) 2021-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
#
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: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- name: Login to docker.io
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
registry: docker.io
- name: Login to quay.io
uses: docker/login-action@v2
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: quay.io
- name: Build docker images
id: build
run: |
set -xe
SHORT_SHA1=$(git rev-parse --short HEAD)
echo "short_sha1=${SHORT_SHA1}" >> $GITHUB_OUTPUT
cd tests/e2e
docker build -t quay.io/eclipse/che-e2e:next -f build/dockerfiles/Dockerfile .
docker tag quay.io/eclipse/che-e2e:next quay.io/eclipse/che-e2e:${SHORT_SHA1}
- name: Push docker images
run: |
docker push quay.io/eclipse/che-e2e:next
docker push quay.io/eclipse/che-e2e:${{ steps.build.outputs.short_sha1 }}
- name: Create failure MM message
if: ${{ failure() }}
run: |
echo "{\"text\":\":no_entry_sign: Next Che E2E build has failed: https://github.com/eclipse/che/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