From b0078e3915a8b5be8e906de10130492e746eb04b Mon Sep 17 00:00:00 2001 From: Georgia Monahan Date: Thu, 14 Nov 2024 16:57:37 +0000 Subject: [PATCH 1/3] Add a comment when the build begins --- .github/workflows/testBuild.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/testBuild.yml b/.github/workflows/testBuild.yml index 1bba3e96735a..5fcf39f680ce 100644 --- a/.github/workflows/testBuild.yml +++ b/.github/workflows/testBuild.yml @@ -60,6 +60,23 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + postGitHubCommentBuildStarted: + runs-on: ubuntu-latest + needs: [validateActor, getBranchRef] + if: ${{ fromJSON(needs.validateActor.outputs.READY_TO_BUILD) }} + steps: + - name: Add build start comment + uses: actions/github-script@v7 + with: + github-token: ${{ github.token }} + script: | + github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: process.env.PULL_REQUEST_NUMBER, + body: `🚧 @${{ github.actor }} has triggered a test build...` + }) + buildAndroid: name: Build Android app for testing uses: ./.github/workflows/buildAndroid.yml From d2035b921d0e47b939f337248c15d31748521244 Mon Sep 17 00:00:00 2001 From: Georgia Monahan Date: Fri, 15 Nov 2024 09:59:12 +0000 Subject: [PATCH 2/3] Add workflow URL --- .github/workflows/testBuild.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testBuild.yml b/.github/workflows/testBuild.yml index 5fcf39f680ce..7edca4d48a3c 100644 --- a/.github/workflows/testBuild.yml +++ b/.github/workflows/testBuild.yml @@ -70,12 +70,13 @@ jobs: with: github-token: ${{ github.token }} script: | + const workflowUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`; github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: process.env.PULL_REQUEST_NUMBER, - body: `🚧 @${{ github.actor }} has triggered a test build...` - }) + body: `🚧 @${{ github.actor }} has triggered a test build. You can view the [workflow run here](${workflowUrl}).` + }); buildAndroid: name: Build Android app for testing From b60b268b217d501f9f8153da4e033c69f2c4e555 Mon Sep 17 00:00:00 2001 From: Georgia Monahan Date: Fri, 15 Nov 2024 09:59:38 +0000 Subject: [PATCH 3/3] capitalize URL --- .github/workflows/testBuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testBuild.yml b/.github/workflows/testBuild.yml index 7edca4d48a3c..035879bf9727 100644 --- a/.github/workflows/testBuild.yml +++ b/.github/workflows/testBuild.yml @@ -70,12 +70,12 @@ jobs: with: github-token: ${{ github.token }} script: | - const workflowUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`; + const workflowURL = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`; github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: process.env.PULL_REQUEST_NUMBER, - body: `🚧 @${{ github.actor }} has triggered a test build. You can view the [workflow run here](${workflowUrl}).` + body: `🚧 @${{ github.actor }} has triggered a test build. You can view the [workflow run here](${workflowURL}).` }); buildAndroid: