Skip to content

Commit 3f51efa

Browse files
committed
added ci
1 parent ce586df commit 3f51efa

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Description
2+
3+
Please include a summary of the changes and the related issue(s). Please also include relevant motivation and context.
4+
5+
Fixes #
6+
7+
## Checklist
8+
9+
Please make sure that the following criteria are met:
10+
11+
- [ ] The PR title is descriptive.
12+
- [ ] Include documentation for example queries (comments or markdown docs)
13+
- [ ] I have ⭐'ed the [stackql](https://github.com/stackql/stackql) and [stackql-actions-demo](https://github.com/stackql/stackql-actions-demo) repos.
14+
15+
## Additional Notes
16+
17+
Add any additional information or context that might help the reviewers.

.github/workflows/star-check.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Check if PR author has starred the repository
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, reopened]
5+
6+
jobs:
7+
check-starred:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout code
12+
uses: actions/[email protected]
13+
14+
- name: Get PR author username
15+
id: get-author
16+
run: echo "username=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
17+
18+
- name: Pull github provider
19+
uses: stackql/[email protected]
20+
with:
21+
is_command: 'true'
22+
query: "REGISTRY PULL github;"
23+
24+
- name: Run stackql query
25+
id: check-star
26+
uses: stackql/[email protected]
27+
with:
28+
test_query: |
29+
SELECT repo, count(*) as has_starred
30+
FROM github.activity.repo_stargazers
31+
WHERE owner = 'stackql' and repo in ('stackql', 'stackql-actions-demo') and login = '${{ env.username }}'
32+
GROUP BY repo;
33+
expected_results_str: '[{"has_starred":"1","repo":"stackql"},{"has_starred":"1","repo":"stackql-actions-demo"}]'
34+
continue-on-error: true
35+
36+
- name: Check if starred
37+
if: always() # Ensures this runs regardless of check-star outcome
38+
run: |
39+
if [ "${{ steps.check-star.outcome }}" = "success" ]; then
40+
echo "::notice::Thanks for your support!"
41+
else
42+
echo "::error::It seems you haven't starred the StackQL repositories. Please star the following repos before proceeding: https://github.com/stackql/stackql-actions-demo (this repo) and https://github.com/stackql/stackql (our core repo)"
43+
exit 1
44+
fi
45+

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
> **Calling All Cloud/DevOps/Data/Security Enthusiasts, Hacktoberfest 2024 is here!**
2+
> Interested in contributing StackQL (SQL) GitHub Actions for **Cloud Security Posture Management (CSPM)**, **Infrastructure-as-Code (IaC) Assurance** or more?
3+
>
4+
> Check out the issues and get started with your first pull request!, Let’s build something amazing together this Hacktoberfest!
5+
6+
💡 **Explore our repositories:** [StackQL](https://github.com/stackql/stackql), [__`stackql-exec`__](https://github.com/marketplace/actions/stackql-studios-stackql-exec), [__`stackql-assert`__](https://github.com/marketplace/actions/stackql-studios-stackql-assert), [StackQL Deploy](https://stackql-deploy.io/docs/), find provider documentation in the [StackQL Provider Registry Docs](https://registry.stackql.io/)
7+
8+
🔎 Build out example queries for [`aws`](https://aws.stackql.io/providers/aws/), [`gcp`](https://google.stackql.io/providers/google/), [`azure`](https://azure.stackql.io/providers/azure/), [`digitalocean`](https://digitalocean.stackql.io/providers/digitalocean/), [`linode`](https://linode.stackql.io/providers/linode/), [`okta`](https://okta.stackql.io/providers/okta/) and more, including multicloud queries!
9+
10+
---
11+
112
# StackQL GitHub Actions Demo
213

314
This repository demonstrates using [__StackQL__](https://github.com/stackql/stackql) with GitHub Actions. StackQL can provision, de-provision, and perform lifecycle operations on cloud resources across all major cloud providers.

0 commit comments

Comments
 (0)