This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
forked from eclipse-che/che-theia
-
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (80 loc) · 2.65 KB
/
next-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#
# 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 & Publish `next`
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
name: Checkout che-theia source code
- uses: actions/setup-node@v1
name: Configuring nodejs 12.x version
with:
node-version: '14.x'
- name: Login to docker.io
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
registry: docker.io
- name: Login to quay.io
uses: docker/login-action@v1
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: quay.io
- name: Build and publish images
run: |
docker image prune -a -f
./build.sh --root-yarn-opts:--ignore-scripts --dockerfile:Dockerfile.alpine --push
env:
CDN_PREFIX: https://static.developers.redhat.com/che/theia_artifacts/
MONACO_CDN_PREFIX: https://cdn.jsdelivr.net/npm/
- name: Set-up npmjs auth token
run: printf "//registry.npmjs.org/:_authToken=${{ secrets.CHE_NPM_AUTH_TOKEN }}\n" >> ~/.npmrc
- name: Publish packages to npmjs
run: yarn publish:next
notify:
runs-on: ubuntu-20.04
needs: build
if: always() && (needs.build.result == 'failure')
steps:
- name: Create failure MM message
if: ${{ failure() }}
run: |
echo "{\"text\":\":no_entry_sign: Next Che Theia build has failed: https://github.com/eclipse-che/che-theia/actions/workflows/next-build.yml\"}" > mattermost.json
- name: Send MM message
if: ${{ success() }} || ${{ failure() }}
uses: mattermost/[email protected]
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
MATTERMOST_CHANNEL: eclipse-che-releases
MATTERMOST_USERNAME: che-bot
travis-build:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Trigger build on Travis CI
run: |
body="{
\"request\":{
\"branch\":\"main\"
}}"
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token ${{ secrets.TRAVIS_TOKEN }}" \
-d "$body" \
https://api.travis-ci.com/repo/eclipse-che%2Fche-theia/requests