Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Run tft workflow on PR #153

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions .github/workflows/tft.yml → .github/workflows/tft-pr.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
name: Run integration tests in Testing Farm
name: Run integration tests in Testing Farm on PR
on:
issue_comment:
pull_request:
types:
- created
- opened
- synchronize
- reopened
permissions:
contents: read
# This is required for the ability to create/update the Pull request status
Expand All @@ -16,13 +18,6 @@ jobs:
# group name contains reponame-pr_num to allow simualteneous runs in different PRs
group: testing-farm-${{ github.event.repository.name }}-${{ github.event.issue.number }}
cancel-in-progress: true
# Let's schedule tests only on user request. NOT automatically.
# Only repository owner or member can schedule tests
if: |
github.event.issue.pull_request
&& contains(github.event.comment.body, '[citest]')
&& (contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR", "CONTRIBUTOR"]'), github.event.comment.author_association)
|| contains('systemroller', github.event.comment.user.login))
runs-on: ubuntu-latest
outputs:
supported_platforms: ${{ steps.supported_platforms.outputs.supported_platforms }}
Expand All @@ -35,6 +30,23 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}

- name: Get User Permission
id: checkAccess
uses: actions-cool/check-user-permission@v2
with:
require: write
username: ${{ github.triggering_actor }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check User Permission
if: steps.checkAccess.outputs.require-result == 'false'
run: |
echo "${{ github.triggering_actor }} does not have permissions on this repo."
echo "Job originally triggered by ${{ github.actor }} with permission level ${{ steps.checkAccess.outputs.user-permission }}"
echo "This jub can be re-run by a maintainer"
exit 1

- name: Checkout repo
uses: actions/checkout@v4

Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/tft_citest_bad.yml

This file was deleted.

Loading