-
Notifications
You must be signed in to change notification settings - Fork 10
79 lines (75 loc) · 2.51 KB
/
viewer-update.yml
File metadata and controls
79 lines (75 loc) · 2.51 KB
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
name: Update Viewer
on:
repository_dispatch:
types: [semantic-release]
env:
app: platform
permissions: {}
jobs:
viewer-update:
permissions:
contents: write # Required for committing changes
runs-on: [self-hosted, common]
if: contains('refs/heads/develop', github.event.client_payload.ref)
steps:
- uses: actions/checkout@v6
with:
token: ${{ secrets.REPOS_TOKEN }}
# Needed for EndBug/add-and-commit
persist-credentials: true
- uses: actions/setup-node@v6
with:
node-version: "24"
check-latest: true
- name: Wait for npm package
id: viewer-install
timeout-minutes: 2
run: |
while ! npm install @bimdata/viewer@${VIEWER_VERSION} --save-exact; do
sleep 5
done
GITDIFF=$(git diff -- package-lock.json | tr '\n' ' ')
echo "gitdiff=$GITDIFF" >> $GITHUB_OUTPUT
env:
VIEWER_VERSION: ${{ github.event.client_payload.viewer-version }}
- name: Commit diff
if: steps.viewer-install.outputs.gitdiff
uses: EndBug/add-and-commit@v10
with:
add: "package-lock.json package.json"
message: "chore: bump @bimdata/viewer@${{ github.event.client_payload.viewer-version }} from Github Actions [skip e2e]"
viewer-stable-update:
permissions:
contents: write # Required for committing changes
runs-on: [self-hosted, common]
if: contains('
refs/heads/master
refs/heads/main'
, github.event.client_payload.ref)
steps:
- uses: actions/checkout@v6
with:
ref: release
persist-credentials: true
- uses: actions/setup-node@v6
with:
node-version: "24"
check-latest: true
- name: Wait for npm package
id: viewer-install
timeout-minutes: 2
run: |
while ! npm install @bimdata/viewer@${VIEWER_VERSION} --save-exact; do
sleep 5
done
GITDIFF=$(git diff -- package-lock.json | tr '\n' ' ')
echo "gitdiff=$GITDIFF" >> $GITHUB_OUTPUT
env:
VIEWER_VERSION: ${{ github.event.client_payload.viewer-version }}
- name: Commit diff
if: steps.viewer-install.outputs.gitdiff
uses: EndBug/add-and-commit@v10
with:
add: "package-lock.json package.json"
message: "chore: bump @bimdata/viewer@${{ github.event.client_payload.viewer-version }} from Github Actions [skip e2e]"
push: origin release