forked from gitpod-io/gitpod
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (58 loc) · 2.29 KB
/
jetbrains-auto-update-template.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
on:
workflow_call:
inputs:
productId:
type: string
required: true
productCode:
type: string
required: true
secrets:
projectId:
required: true
serviceAccountKey:
required: true
slackWebhook:
required: true
jobs:
update-jetbrains:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.1'
- name: Download leeway
run: cd /usr/local/bin && curl -fsSL https://github.com/gitpod-io/leeway/releases/download/v0.2.17/leeway_0.2.17_Linux_x86_64.tar.gz | tar xz
- name: Download golangci-lint
run: cd /usr/local && curl -fsSL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.45.2
- name: Download GoKart
run: cd /usr/local/bin && curl -L https://github.com/praetorian-inc/gokart/releases/download/v0.4.0/gokart_0.4.0_linux_x86_64.tar.gz | tar xzv gokart
- name: Auth Google Cloud SDK
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.serviceAccountKey }}
- uses: actions/setup-java@v2
with:
distribution: zulu
java-version: "11"
- name: Leeway build
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.projectId }}
env:
LEEWAY_REMOTE_CACHE_BUCKET: gitpod-core-leeway-cache-branch
- run: |
gcloud auth configure-docker --quiet
export LEEWAY_WORKSPACE_ROOT=$(pwd)
data=$(curl -sSL "https://data.services.jetbrains.com/products?code=${{ inputs.productCode }}&fields=distributions%2Clink%2Cname%2Creleases&_=$(date +%s)000")
link=$(echo "$data" | jq -r '.[0].releases[0].downloads.linux.link')
cd components/ide/jetbrains/image
leeway build -Dversion=latest -DimageRepoBase=eu.gcr.io/gitpod-core-dev/build -DjetbrainsBackendQualifier=latest -D${{ inputs.productId }}DownloadUrl=$link .:${{ inputs.productId }}
- name: Slack Notification
if: always()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.slackWebhook }}
SLACK_COLOR: ${{ job.status }}
SLACK_TITLE: ${{ inputs.productId }}