Skip to content

Commit

Permalink
build_test
Browse files Browse the repository at this point in the history
  • Loading branch information
mwangggg committed Jul 26, 2023
1 parent bff37a1 commit 815fe3b
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/pr-command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: PR Command

concurrency:
group: ci-${{ github.run_id }}
cancel-in-progress: true

on:
issue_comment:
types: [created]

jobs:
build-and-test:
runs-on: ubuntu-latest
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/build_test') }}
steps:
- name: Set latest commit status as pending
uses: myrotvorets/set-commit-status-action@master
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
- name: Command handler for building and testing
id: command
uses: xt0rted/slash-command-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
command: build_test
reaction: "true"
reaction-type: "+1"
allow-edits: "false"
permission-level: write
- name: Build image
id: build-image
uses: ./.github/workflows/ci-build-image.yml
secrets: inherit
with:
build-arch: amd64
- name: Print the image
uses: thollander/actions-comment-pull-request@v1
with:
message: |-
Preview image available:
- name: Set latest commit status as ${{ job.status }}
uses: myrotvorets/set-commit-status-action@master
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}

0 comments on commit 815fe3b

Please sign in to comment.