From 61cb6880c6d872590c592faaee6f3973c3965c3f Mon Sep 17 00:00:00 2001 From: Benoit Donneaux Date: Thu, 23 May 2024 22:28:44 +0200 Subject: [PATCH] Adapt to Gitea Signed-off-by: Benoit Donneaux --- .gitea/pr-commenter.yml | 35 +++++++++++++++++++++++++++++++++++ .gitea/workflows/jekyll.yaml | 21 +++++++++++---------- .github/pr-commenter.yml | 35 ----------------------------------- 3 files changed, 46 insertions(+), 45 deletions(-) create mode 100644 .gitea/pr-commenter.yml delete mode 100644 .github/pr-commenter.yml diff --git a/.gitea/pr-commenter.yml b/.gitea/pr-commenter.yml new file mode 100644 index 0000000..1e48903 --- /dev/null +++ b/.gitea/pr-commenter.yml @@ -0,0 +1,35 @@ +comment: + glob-options: + dot: true + snippets: + - id: image-{{ imageOutcome }} + files: + - '**' + body: | + #### :hammer: Docker image `{{ imageOutcome }}` + + - id: build-{{ buildOutcome }} + files: + - '**' + body: | + #### :mag: Jekyll build `{{ buildOutcome }}` +
Build Output + + ``` + {{ buildOutputsResult }} + ``` + +
+ + - id: deploy-{{ deployOutcome }} + files: + - '**' + body: | + #### :rocket: Jekyll deploy `{{ deployOutcome }}` + #### :link: Preview documentation [here]({{ deployUrl }}) + + - id: pusher-{{ gitActor }}-{{ gitEventName }}-{{ gitRunNumber }}-{{ gitRunAttempt }} + files: + - '**' + body: | + *Pusher: @{{ gitActor }}, Action: `{{ gitEventName }}`, Workflow: `{{ gitWorkflow }}`, Run: {{ gitRunNumber }}/{{ gitRunAttempt }}* diff --git a/.gitea/workflows/jekyll.yaml b/.gitea/workflows/jekyll.yaml index 0501262..9b55852 100644 --- a/.gitea/workflows/jekyll.yaml +++ b/.gitea/workflows/jekyll.yaml @@ -63,21 +63,22 @@ jobs: - name: Comment pull request id: comment_pull_request if: gitea.event_name == 'pull_request' - uses: exercism/pr-commenter-action@v1.4.0 + uses: exercism/pr-commenter-action@v1.5.1 with: template-variables: | { - "asciidocOutcome": "${{ steps.asciidoc.outcome }}", - "verifyOutcome": "${{ steps.verify.outcome }}", - "verifyOutputsResult": ${{ toJSON(steps.verify.outputs.result) }}, - "deployOutcome": "${{ steps.deploy.outcome }}", + "imageOutcome": "${{ steps.build_image.outcome }}", + "buildOutcome": "${{ steps.build_site.outcome }}", + "buildOutputsResult": ${{ toJSON(steps.build_site.outputs.result) }}, + "deployOutcome": "${{ steps.deploy_site.outcome }}", "deployUrl": "${{ format('{0}/{1}{2}/', env.BASE_URL, env.PREFIX, env.SUFFIX) }}", - "githubActor": "${{ github.actor }}", - "githubEventName": "${{ github.event_name }}", - "githubWorkflow": "${{ github.workflow }}", - "githubRunNumber": "${{ github.run_number }}", - "githubRunAttempt": "${{ github.run_attempt }}" + "gitActor": "${{ gitea.actor }}", + "gitEventName": "${{ gitea.event_name }}", + "gitWorkflow": "${{ gitea.workflow }}", + "gitRunNumber": "${{ gitea.run_number }}", + "gitRunAttempt": "${{ gitea.run_attempt }}" } + config-file: ".gitea/pr-commenter.yml" - name: Fail on error id: fail-on-error if: | diff --git a/.github/pr-commenter.yml b/.github/pr-commenter.yml deleted file mode 100644 index 0ef5304..0000000 --- a/.github/pr-commenter.yml +++ /dev/null @@ -1,35 +0,0 @@ -comment: - glob-options: - dot: true - snippets: - - id: asciidoc-{{ asciidocOutcome }} - files: - - '**' - body: | - #### :hammer: AsciiDoc conversion `{{ asciidocOutcome }}` - - - id: verify-{{ verifyOutcome }} - files: - - '**' - body: | - #### :mag: Broken link verification `{{ verifyOutcome }}` -
Verification Output - - ``` - {{ verifyOutputsResult }} - ``` - -
- - - id: deploy-{{ deployOutcome }} - files: - - '**' - body: | - #### :rocket: AsciiDoc deploy `{{ deployOutcome }}` - #### :link: Preview documentation [here]({{ deployUrl }}) - - - id: pusher-{{ githubActor }}-{{ githubEventName }}-{{ githubRunNumber }}-{{ githubRunAttempt }} - files: - - '**' - body: | - *Pusher: @{{ githubActor }}, Action: `{{ githubEventName }}`, Workflow: `{{ githubWorkflow }}`, Run: {{ githubRunNumber }}/{{ githubRunAttempt }}*