From 6dcafbe550a6e542348b0d87c3cff588afde6239 Mon Sep 17 00:00:00 2001 From: Viorel Cojocaru Date: Mon, 10 Mar 2025 19:35:38 +0100 Subject: [PATCH 1/4] chore: Bump agent-action --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 117b77ba..2856a137 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,7 +24,7 @@ jobs: # Send webpack stats and build information to RelativeCI - name: Send webpack stats to RelativeCI - uses: relative-ci/agent-action@7abf50165f867d55da7dcb0ba0f7f6cf51bab964 + uses: relative-ci/agent-action@v3.0.0-beta with: webpackStatsFile: ./artifacts/webpack-stats.json key: ${{ secrets.RELATIVE_CI_KEY }} From d206c2570ddf619f113e37d9f551582c099a88b6 Mon Sep 17 00:00:00 2001 From: Viorel Cojocaru Date: Sat, 10 May 2025 16:59:28 +0200 Subject: [PATCH 2/4] build: Fetch latest 2 commits --- .github/workflows/build.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2856a137..85a864a4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,6 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + fetch-depth: 2 + - uses: actions/setup-node@v3 with: node-version: '16.x' From 3e944ff671f1aa21edec595743cd1e4bf5cc6b68 Mon Sep 17 00:00:00 2001 From: Viorel Cojocaru Date: Sun, 11 May 2025 16:33:28 +0200 Subject: [PATCH 3/4] build: Fetch commit message from GitHub api --- .github/workflows/build.yaml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 85a864a4..a30e3179 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,8 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: - fetch-depth: 2 - uses: actions/setup-node@v3 with: @@ -25,11 +23,27 @@ jobs: # Build and output webpack stats to artifacts/webpack-stats.json - run: npm run build --if-present + # Read pull request commit message + - name: Read pull request commit message + id: pull-request-commit-message + run: | + # Get the pull request commit's SHA/ID from the event data file + COMMIT_SHA=$(cat $GITHUB_EVENT_PATH | jq -r ".pull_request.head.sha") + + # Fetch commit data from the GitHub API and pick the commit message value + COMMIT_MESSAGE=$(gh api /repos/$GITHUB_REPOSITORY/commits/$COMMIT_SHA --jq .commit.message) + + # Set output + echo "commit-message=$COMMIT_MESSAGE" > $GITHUB_OUTPUT + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Send webpack stats and build information to RelativeCI - name: Send webpack stats to RelativeCI uses: relative-ci/agent-action@v3.0.0-beta with: webpackStatsFile: ./artifacts/webpack-stats.json key: ${{ secrets.RELATIVE_CI_KEY }} - token: ${{ secrets.GITHUB_TOKEN }} - debug: true + debug: true + env: + RELATIVE_CI_COMMIT_MESSAGE: ${{ steps.pull-request-commit-message.outputs.commit-message }} From 4a7b4b0092f4e92bccdd8e232898a780baddd4fe Mon Sep 17 00:00:00 2001 From: Viorel Cojocaru Date: Sat, 17 May 2025 09:58:21 +0200 Subject: [PATCH 4/4] build: RelativeCI agent - pass token --- .github/workflows/build.yaml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a30e3179..c8112e8d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,27 +23,11 @@ jobs: # Build and output webpack stats to artifacts/webpack-stats.json - run: npm run build --if-present - # Read pull request commit message - - name: Read pull request commit message - id: pull-request-commit-message - run: | - # Get the pull request commit's SHA/ID from the event data file - COMMIT_SHA=$(cat $GITHUB_EVENT_PATH | jq -r ".pull_request.head.sha") - - # Fetch commit data from the GitHub API and pick the commit message value - COMMIT_MESSAGE=$(gh api /repos/$GITHUB_REPOSITORY/commits/$COMMIT_SHA --jq .commit.message) - - # Set output - echo "commit-message=$COMMIT_MESSAGE" > $GITHUB_OUTPUT - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Send webpack stats and build information to RelativeCI - name: Send webpack stats to RelativeCI uses: relative-ci/agent-action@v3.0.0-beta with: webpackStatsFile: ./artifacts/webpack-stats.json + token: ${{ secrets.GITHUB_TOKEN }} key: ${{ secrets.RELATIVE_CI_KEY }} debug: true - env: - RELATIVE_CI_COMMIT_MESSAGE: ${{ steps.pull-request-commit-message.outputs.commit-message }}