Skip to content

Commit

Permalink
WIP 2
Browse files Browse the repository at this point in the history
  • Loading branch information
plietar committed May 16, 2024
1 parent 1dbd813 commit 20cf5cd
Showing 1 changed file with 1 addition and 40 deletions.
41 changes: 1 addition & 40 deletions .github/workflows/touchstone-comment.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
name: Continuous Benchmarks (Comment)

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

on:
workflow_run:
workflows: ["Continuous Benchmarks (Receive)"]
types:
- in_progress
- completed

jobs:
Expand All @@ -20,44 +15,10 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"

status:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v5
if: always()
with:
script: |
let url = '${{ github.event.workflow_run.html_url }}'
let state
let description
if (${{ github.event.action == 'in_progress' }}) {
state = 'pending'
description = 'Benchmarking pending...'
} else if (${{ github.event.workflow_run.conclusion == 'failure' }}) {
state = 'failure'
description = 'Benchmarking failed!'
} else {
state = 'success';
description = 'Benchmarking succeeded!'
}
github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: '${{ github.event.workflow_run.head_sha}}',
state: state,
target_url: url,
description: description,
context: 'touchstone status'
})
comment:
runs-on: ubuntu-latest
if: >
(github.event.action == 'completed') &&
(github.event.workflow_run.event == 'pull_request')
github.event.workflow_run.event == 'pull_request'
steps:
- uses: plietar/touchstone/actions/comment@main
Expand Down

0 comments on commit 20cf5cd

Please sign in to comment.