Skip to content

Allow users to provide essential information (PR number, sha, etc.) when running on non-pull_request contexts #305

Allow users to provide essential information (PR number, sha, etc.) when running on non-pull_request contexts

Allow users to provide essential information (PR number, sha, etc.) when running on non-pull_request contexts #305

on:
issue_comment:
types:
- created
jobs:
container-tests:
runs-on: ubuntu-22.04
name: "Variables test for testing farm as a github action"
if: |
github.event.issue.pull_request
&& contains(github.event.comment.body, '[test]')
&& contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association)
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: "refs/pull/${{ github.event.issue.number }}/head"
- name: Run the tests
uses: ./
with:
api_key: ${{ secrets.TF_PUBLIC_API_KEY }}
tmt_plan_regex: "variables_plan"
pull_request_status_name: "Variables test"
variables: "SOME_DUMMY_VARIABLE=FOO_BAR_VARIABLE;OS_VARIABLE=DUMMY_OS"
update_pull_request_status: "true"