forked from openhab/openhab-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update RelativeCI agent action (openhab#2063)
The RelativeCI action was using the CLI with an inline API key. This PR replaces the RelativeCI CLI with the action agent running on workflow_run event and in the context of the default branch (secrets are not leaked to forks). Signed-off-by: Viorel Cojocaru <[email protected]>
- Loading branch information
Showing
5 changed files
with
23 additions
and
1,205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,13 +74,9 @@ jobs: | |
with: | ||
name: report | ||
path: /home/runner/work/openhab-webui/openhab-webui/bundles/org.openhab.ui/web/report.html | ||
|
||
- name: Upload stats to RelativeCI | ||
run: npx relative-ci-agent | ||
env: | ||
# was: RELATIVE_CI_KEY: ${{ secrets.RELATIVE_CI_KEY }} | ||
# but wouldn't work for PRs made from forks... | ||
# Bad practice (!), however since the service itself as well as | ||
# what can be done with the key (add new bundle stats) is not | ||
# critical, not hiding the key is deemed acceptable for now! | ||
RELATIVE_CI_KEY: f8e0e450-804c-11eb-b7f5-510e2634a5c9 | ||
|
||
# Upload bundle stats to use on relative-ci.yaml workflow | ||
- name: Upload webpack stats artifact | ||
uses: relative-ci/[email protected] | ||
with: | ||
webpackStatsFile: ./bundles/org.openhab.ui/web/stats.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: RelativeCI | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Main UI"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Send bundle stats and build information to RelativeCI | ||
uses: relative-ci/[email protected] | ||
with: | ||
key: ${{ secrets.RELATIVE_CI_KEY }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.