Skip to content

Commit eeca383

Browse files
committed
Update GHA with draft script
1 parent 66e6ea6 commit eeca383

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

.github/workflows/jetbrains-auto-update-template.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,37 @@ jobs:
2020
with:
2121
task: ${{ inputs.productId }}
2222

23+
draft-script:
24+
runs-on: ${{ needs.create-runner.outputs.label }}
25+
container:
26+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
27+
needs: [ create-runner ]
28+
steps:
29+
- uses: actions/checkout@v2
30+
- name: Setup Environment
31+
uses: ./.github/actions/setup-environment
32+
with:
33+
identity_provider: ${{ github.ref == 'refs/heads/main' && secrets.CORE_DEV_PROVIDER || secrets.DEV_PREVIEW_PROVIDER }}
34+
service_account: ${{ github.ref == 'refs/heads/main' && secrets.CORE_DEV_SA || secrets.DEV_PREVIEW_SA }}
35+
leeway_segment_key: ${{ secrets.LEEWAY_SEGMENT_KEY }}
36+
- name: Install dependencies
37+
run: |
38+
curl -fsSL https://github.com/csweichel/oci-tool/releases/download/v0.2.1/oci-tool_0.2.1_linux_amd64.tar.gz | tar xz -C /usr/local/bin
39+
chmod +x /usr/local/bin/oci-tool
40+
cd ./components/ide/gha-update-image/
41+
yarn
42+
npm i -g bun
43+
- name: Find Nightly Target
44+
id: target
45+
run: |
46+
cd ./components/ide/gha-update-image/
47+
bun run index-jb-nightly.ts
48+
49+
if [ -f /tmp/__gh_output.txt ]
50+
then
51+
cat /tmp/__gh_output.txt >> $GITHUB_OUTPUT
52+
fi
53+
2354
update-jetbrains:
2455
runs-on: ${{ needs.create-runner.outputs.label }}
2556
container:

components/ide/gha-update-image/index-jb-nightly.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// ```
1010

1111
import { $ } from "bun";
12-
import { pathToBackendPluginGradleLatest, readWorkspaceYaml } from "./lib/common";
12+
import { appendGitHubOutput, pathToBackendPluginGradleLatest, readWorkspaceYaml } from "./lib/common";
1313
import { maybeCompatible, parseGradleProperties, parseGradlePropertiesFromTaskConfig } from "./lib/jb-helper/jb-helper";
1414
import { fetchProductReleases, ReleaseItem, releaseItemStr } from "./lib/jb-helper/jb-releases";
1515
import { getTaskFromArgs } from "./lib/jb-helper/jb-gradle-task-config";
@@ -70,3 +70,7 @@ const targetConfig = parseGradlePropertiesFromTaskConfig(task, targetRelease);
7070
console.log(
7171
`Going to exec \`leeway build -Dversion=latest -DimageRepoBase=$imageRepoBase -DbuildNumber=${targetConfig.platformVersion} components/ide/jetbrains/image:${task.productId}-latest -DjbBackendVersion=${targetRelease.version}\``,
7272
);
73+
74+
appendGitHubOutput(`buildNumber=${targetConfig.platformVersion}`);
75+
appendGitHubOutput(`image=${task.productId}`);
76+
appendGitHubOutput(`jbBackendVersion=${targetRelease.version}`);

0 commit comments

Comments
 (0)