Skip to content

Commit

Permalink
add test workflow (#212)
Browse files Browse the repository at this point in the history
* add test workflow

* bump versions

* add test command

* rename to chatops
  • Loading branch information
osterman authored Jun 10, 2020
1 parent 7cea1b5 commit de92d44
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 20 deletions.
6 changes: 6 additions & 0 deletions modules/github/Makefile.init
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ GITHUB_TEMPLATES = \
.github/ISSUE_TEMPLATE/bug_report.md \
.github/ISSUE_TEMPLATE/question.md


ifneq ($(wildcard *.tf),)
# Install test workflow for terraform projects
GITHUB_TEMPLATES += .github/workflows/chatops.yml
endif

$(GITHUB_TEMPLATES): $(addprefix $(BUILD_HARNESS_PATH)/templates/, $(GITHUB_TEMPLATES))
mkdir -p $(dir $@)
cp $(BUILD_HARNESS_PATH)/templates/$@ $@
Expand Down
37 changes: 37 additions & 0 deletions templates/.github/workflows/chatops.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: chatops
on:
issue_comment:
types: [created]

jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Handle common commands"
uses: cloudposse/actions/github/[email protected]
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
reaction-token: ${{ secrets.GITHUB_TOKEN }}
repository: cloudposse/actions
commands: rebuild-readme, terraform-fmt
permission: none
issue-type: pull-request

test:
runs-on: ubuntu-latest
steps:
- name: "Checkout commit"
uses: actions/checkout@v2
- name: "Run tests"
uses: cloudposse/actions/github/[email protected]
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
reaction-token: ${{ secrets.GITHUB_TOKEN }}
repository: cloudposse/actions
commands: test
permission: none
issue-type: pull-request
reactions: false


20 changes: 0 additions & 20 deletions templates/.github/workflows/slash-command-dispatch.yml

This file was deleted.

0 comments on commit de92d44

Please sign in to comment.