File tree Expand file tree Collapse file tree 9 files changed +136
-156
lines changed Expand file tree Collapse file tree 9 files changed +136
-156
lines changed Original file line number Diff line number Diff line change 1+ name : Build
2+
3+ on :
4+ workflow_call :
5+ outputs :
6+ artifact-name :
7+ value : ${{ jobs.build.outputs.artifact-name }}
8+ version :
9+ value : ${{ jobs.build.outputs.version }}
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ outputs :
15+ artifact-name : ${{ steps.get-artifact-name.outputs.artifact_name }}
16+ version : ${{ steps.get-artifact-name.outputs.version }}
17+ steps :
18+ - uses : actions/checkout@v4
19+ - uses : actions/setup-node@v4
20+ id : setup-node
21+ with :
22+ node-version-file : ' .nvmrc'
23+ cache : ' yarn'
24+
25+ - run : yarn install --frozen-lockfile
26+
27+ - run : yarn build
28+
29+ - name : Get artifact name and version
30+ id : get-artifact-name
31+ run : |
32+ git fetch --tags
33+ LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
34+ echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
35+ NAME="dist-$LATEST_TAG"
36+ echo "ARTIFACT_NAME=$NAME" >> $GITHUB_ENV
37+ echo "artifact_name=$NAME" >> $GITHUB_OUTPUT
38+ echo "version=${LATEST_TAG#v}" >> $GITHUB_OUTPUT
39+
40+ - name : Upload artifact
41+ uses : actions/upload-artifact@v4
42+ with :
43+ name : ${{ env.ARTIFACT_NAME }}
44+ path : packages/jaeger-ui/build/
Original file line number Diff line number Diff line change 1919 - uses : actions/download-artifact@v4
2020 with :
2121 name : ${{ inputs.dist-artifact-name }}
22- - run : |
23- mkdir -p dist
24- unzip -q ${{ inputs.dist-artifact-name }} -d dist
22+ path : dist
2523
2624 - name : Set up QEMU
2725 uses : docker/setup-qemu-action@v3
Original file line number Diff line number Diff line change 1+ name : Lint & test
2+
3+ on :
4+ workflow_call :
5+
6+ jobs :
7+ build :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v4
11+ - uses : actions/setup-node@v4
12+ id : setup-node
13+ with :
14+ node-version-file : ' .nvmrc'
15+ cache : ' yarn'
16+
17+ - run : yarn install --frozen-lockfile
18+
19+ - name : Lint
20+ run : yarn lint
21+
22+ - name : Test
23+ run : yarn test
Original file line number Diff line number Diff line change 2828jobs :
2929 lint-test :
3030 name : Lint & test
31- uses : ./.github/workflows/lint-test.yml
31+ uses : ./.github/workflows/digma- lint-test.yml
3232
3333 build :
3434 name : Build
3535 needs : lint-test
36- uses : ./.github/workflows/build.yml
36+ uses : ./.github/workflows/digma- build.yml
3737
38- build-test- docker-image :
38+ build-docker-image :
3939 name : Build Docker image
4040 needs : build
41- uses : ./.github/workflows/docker-image.yml
41+ uses : ./.github/workflows/digma- docker-image.yml
4242 secrets : inherit
4343 with :
44- dist-artifact-name : ${{ needs.build.outputs.dist-filename }}
44+ dist-artifact-name : ${{ needs.build.outputs.artifact-name }}
4545 push : false
Original file line number Diff line number Diff line change 1717 - uses : actions/download-artifact@v4
1818 with :
1919 name : ${{ inputs.artifact-name }}
20+ path : dist
21+
22+ - run : |
23+ cd dist
24+ zip -r ${{ inputs.artifact-name }}.zip *
2025
2126 - uses : softprops/action-gh-release@v2
2227 with :
23- files : ${{ inputs.artifact-name }}
28+ files : dist/ ${{ inputs.artifact-name }}.zip
2429 env :
2530 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Lint & test & build & publish Docker image
2+
3+ on :
4+ workflow_dispatch :
5+ release :
6+ types : [released]
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ lint-test :
13+ name : Lint & test
14+ uses : ./.github/workflows/digma-lint-test.yml
15+
16+ build :
17+ name : Build
18+ needs : lint-test
19+ uses : ./.github/workflows/digma-build.yml
20+
21+ attach-release-asset :
22+ name : Attach release asset
23+ needs : build
24+ uses : ./.github/workflows/digma-release-asset.yml
25+ with :
26+ artifact-name : ${{ needs.build.outputs.artifact-name}}
27+
28+ build-push-docker-image :
29+ name : Build & push Docker image
30+ needs : build
31+ uses : ./.github/workflows/digma-docker-image.yml
32+ secrets : inherit
33+ with :
34+ dist-artifact-name : ${{ needs.build.outputs.artifact-name }}
35+ push : true
36+
37+ update-digma-ui :
38+ name : Update version in Digma UI
39+ needs : [attach-release-asset, build-push-docker-image]
40+ runs-on : ubuntu-latest
41+ steps :
42+ - uses : actions/checkout@v4
43+ - name : Get Jaeger version
44+ run : echo "JAEGER_VERSION=$(jq -r '.version' jaeger.json)" >> $GITHUB_ENV
45+
46+ - name : Create PR in digma-ui
47+ run : |
48+ curl -X POST -H "Accept: application/vnd.github.v3+json" \
49+ -H "Authorization: token ${{ secrets.RELEASE_PAT }}" \
50+ https://api.github.com/repos/digma-ai/digma-ui/dispatches \
51+ -d '{
52+ "event_type": "update-jaeger",
53+ "client_payload": {
54+ "jaegerUIVersion": "'"${{ needs.build.outputs.version }}"'",
55+ "jaegerVersion": "'"${{ env.JAEGER_VERSION }}"'"
56+ }
57+ }'
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments