From 3ea4d8689d7100ca72c7ce56d6a1e3548a1c0c4d Mon Sep 17 00:00:00 2001 From: Kilian Ciuffolo Date: Sun, 12 May 2024 13:44:53 -0700 Subject: [PATCH 1/4] fix: use path relative to the action not the workflow --- action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index 5b7cd8e..2585c64 100644 --- a/action.yaml +++ b/action.yaml @@ -64,6 +64,6 @@ runs: with: github-token: ${{ inputs.token }} script: | - const script = require('${{ github.workspace }}/src/update-comment.js') + const script = require('./src/update-comment.js') const revision = '${{ github.event.pull_request.head.sha || github.sha }}' await script({ context, github }, revision) From a875ce34824716cfd2cbf78ae3350d28d96c4e03 Mon Sep 17 00:00:00 2001 From: Kilian Ciuffolo Date: Sun, 12 May 2024 13:53:42 -0700 Subject: [PATCH 2/4] GITHUB_ACTION_PATH --- action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yaml b/action.yaml index 2585c64..259d3b1 100644 --- a/action.yaml +++ b/action.yaml @@ -15,7 +15,7 @@ inputs: description: The token to use for pushing to the repository. default: ${{ github.token }} runs: - using: "composite" + using: composite steps: - name: Checkout Coverage Branch uses: actions/checkout@v4 @@ -64,6 +64,6 @@ runs: with: github-token: ${{ inputs.token }} script: | - const script = require('./src/update-comment.js') + const script = require('${GITHUB_ACTION_PATH}/src/update-comment.js') const revision = '${{ github.event.pull_request.head.sha || github.sha }}' await script({ context, github }, revision) From 9da3498fed6583c8562a634f6c29d9a17157f346 Mon Sep 17 00:00:00 2001 From: Kilian Ciuffolo Date: Sun, 12 May 2024 13:56:04 -0700 Subject: [PATCH 3/4] a --- action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index 259d3b1..5ea315c 100644 --- a/action.yaml +++ b/action.yaml @@ -64,6 +64,6 @@ runs: with: github-token: ${{ inputs.token }} script: | - const script = require('${GITHUB_ACTION_PATH}/src/update-comment.js') + const script = require(`${process.env.GITHUB_ACTION_PATH}/src/update-comment.js`) const revision = '${{ github.event.pull_request.head.sha || github.sha }}' await script({ context, github }, revision) From c41f07c2e426db2e840da3517d890ef9ca28922a Mon Sep 17 00:00:00 2001 From: Kilian Ciuffolo Date: Sun, 12 May 2024 14:06:45 -0700 Subject: [PATCH 4/4] fix --- action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index 5ea315c..48f67fe 100644 --- a/action.yaml +++ b/action.yaml @@ -37,7 +37,7 @@ runs: rm .git/index git clean -fdx touch index.html - cp ../nord.css . + cp ${GITHUB_ACTION_PATH}/assets/nord.css . git add index.html nord.css git config user.email "go-coverage-action@github.com" git config user.name "go-coverage-action"