Skip to content

Commit 8423149

Browse files
Improve GitHub Actions (#3120)
* upgrade relative-ci/agent-action from 2.1.10 to 2.2.0 relative-ci/agent-action@v2.1.10...v2.2.0 * pin external action relative-ci/agent-action to specific SHA * pin external action relative-ci/agent-upload-artifact-action to specific SHA * set global timeout * comments Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
1 parent fbdcf55 commit 8423149

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/ci-build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
os: [ 'ubuntu-24.04' ]
2525
name: Build (Java ${{ matrix.java }}, ${{ matrix.os }})
2626
runs-on: ${{ matrix.os }}
27+
# typical duration is ~5min, set a reasonable amount as limit (default is 6h)
28+
timeout-minutes: 20
2729
steps:
2830
- name: Checkout
2931
if: github.head_ref == ''
@@ -51,6 +53,7 @@ jobs:
5153
distribution: 'temurin'
5254
java-version: ${{ matrix.java }}
5355

56+
# pinning to SHA to mitigate possible supply chain attack
5457
- name: Set up Maven ${{ matrix.maven }}
5558
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
5659
with:
@@ -100,6 +103,8 @@ jobs:
100103
path: '**/checkstyle-result.xml'
101104
mode: inline
102105

106+
# this will identify modifications to files under source control during the workflow run;
107+
# untracked files will be included as well!
103108
- name: Verify Changed Files
104109
id: verify-changed-files
105110
run: |

.github/workflows/mainui.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ jobs:
8888
name: report
8989
path: /home/runner/work/openhab-webui/openhab-webui/bundles/org.openhab.ui/web/report.html
9090

91-
# Upload bundle stats to use on relative-ci.yaml workflow
91+
# Upload bundle stats to use on relative-ci.yaml workflow,
92+
# pinning to SHA to mitigate possible supply chain attack
9293
- name: Upload webpack stats artifact to RelativeCI
93-
uses: relative-ci/agent-upload-artifact-action@v2
94+
uses: relative-ci/agent-upload-artifact-action@a2b5741b4f7e6a989c84ec1a3059696b23c152e5 # v2.0.0
9495
with:
9596
webpackStatsFile: ./bundles/org.openhab.ui/web/stats.json

.github/workflows/relative-ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13+
# pinning to SHA to mitigate possible supply chain attack
1314
- name: Send bundle stats and build information to RelativeCI
14-
uses: relative-ci/agent-action@v2.1.10
15+
uses: relative-ci/agent-action@38328454d6a23942175eba485fca4fbb807b1f03 # v2.2.0
1516
with:
1617
key: ${{ secrets.RELATIVE_CI_KEY }}
1718
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)