Skip to content

Commit 539a144

Browse files
committed
wip
1 parent e5221ca commit 539a144

1 file changed

Lines changed: 34 additions & 3 deletions

File tree

.github/workflows/validate.yaml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ permissions:
1212

1313
jobs:
1414
validate:
15-
name: 'Validate Changed Packages'
16-
if: github.event.action == 'labeled' && contains(github.event.pull_request.labels.*.name, 'run-full-validation')
15+
name: 'Validate Changed Packages - Github Hosted'
16+
if: >
17+
github.event.action == 'labeled' &&
18+
contains(github.event.pull_request.labels.*.name, 'run-full-validation') &&
19+
!contains(github.event.pull_request.labels.*.name, 'long-run')
1720
runs-on: ubuntu-latest
1821

1922
steps:
@@ -30,7 +33,35 @@ jobs:
3033
sleep 30
3134
exit 0
3235
33-
- name: Remove Label using GitHub CLI
36+
- name: 'Remove label'
37+
run: |
38+
curl -X DELETE -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
39+
-H "Accept: application/vnd.github.v3+json" \
40+
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels/run-full-validation"
41+
42+
validate-self-hosted:
43+
name: 'Validate Changed Packages- Self-Hosted'
44+
if: >
45+
github.event.action == 'labeled' &&
46+
contains(github.event.pull_request.labels.*.name, 'run-full-validation') &&
47+
contains(github.event.pull_request.labels.*.name, 'long-run')
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
- name: Checkout code
52+
uses: actions/checkout@v4
53+
with:
54+
fetch-depth: 0
55+
56+
- name: Run Validation Script
57+
run: |
58+
echo "Running validation because 'full validation' label was added"
59+
# Add your validation logic here (e.g., linting, testing)
60+
61+
sleep 30
62+
exit 0
63+
64+
- name: 'Remove label'
3465
run: |
3566
curl -X DELETE -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
3667
-H "Accept: application/vnd.github.v3+json" \

0 commit comments

Comments
 (0)