Skip to content

Commit 273a8e2

Browse files
authored
Attempt to finish container publish (#2009)
Loads the image and clones matter.js, which were missing. Also attempts to PR the new SHA.
1 parent 0d4d6ab commit 273a8e2

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

.github/workflows/build-test.chip.yml

+40-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,12 @@ jobs:
176176
test-app-cc-1,
177177
test-app-cc-2
178178
]
179-
if: needs.chip-image.outputs.source == 'artifact' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
179+
if: >-
180+
needs.chip-image.outputs.source == 'artifact' &&
181+
(
182+
github.event_name == 'schedule' ||
183+
github.event_name == 'workflow_dispatch'
184+
)
180185
steps:
181186
- name: Login to GitHub Docker Registry
182187
uses: docker/login-action@v3
@@ -185,9 +190,42 @@ jobs:
185190
username: Automator77
186191
password: ${{ secrets.MATTERJS_DOCKER_TOKEN }}
187192

193+
- name: Load image from artifact
194+
uses: ./.github/actions/load-chip
195+
196+
- name: Check out matter.js
197+
uses: actions/checkout@v4
198+
199+
- name: Sync CHIP SHA with built version
200+
env:
201+
CHIP_SHA: ${{ needs.chip-image.outputs.chip-sha }}
202+
run: |
203+
cd chip
204+
echo "$CHIP_SHA" > SHA.txt
205+
188206
- name: Publish docker image
189207
run: |
190208
cd chip
191209
./bin/info
192210
./bin/publish
193-
211+
212+
# TODO - right now we PR the CHIP SHA after publishing container. Not exactly correct but it's not a big deal if
213+
# the SHA somehow doesn't get committed. To fix we will need to figure out how to load the tar artifact from this
214+
# workflow in the PR workflow
215+
- name: PR new CHIP SHA
216+
uses: peter-evans/create-pull-request@v7
217+
with:
218+
token: ${{ secrets.PR_TOKEN }}
219+
commit-message: "[CHIP BUILD] ${{ needs.chip-image.outputs.chip-sha }}"
220+
committer: Automator77 <[email protected]>
221+
author: Automator77 <[email protected]>
222+
signoff: false
223+
branch: chip-image
224+
delete-branch: true
225+
title: "[CHIP BUILD] ${{ needs.chip-image.outputs.chip-sha }}"
226+
body: |
227+
New CHIP SHA from CI container build
228+
labels: |
229+
automated pr
230+
assignees: Automator77
231+
draft: false

.github/workflows/release-npm.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ name: Automatic Labeled Release
55
on:
66
pull_request:
77
types: [labeled]
8+
branches: [ 'nightly-release', 'official-release' ]
89

910
# Cancel previous PR/branch runs when a new commit is pushed
1011
concurrency:

0 commit comments

Comments
 (0)