Skip to content

SC-85410 | V2 demos build on schedule #1358

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

Open
wants to merge 128 commits into
base: master
Choose a base branch
from

Conversation

Alan-eMartin
Copy link
Collaborator

@Alan-eMartin Alan-eMartin commented May 1, 2025

Summary:

Workflows added to build the master and dev branch on a bi-daily basis (every two days).

Please note, we will need to check out the dev version of the workflow once this change is merged to dev

As seen here:
from ./workflows/v2-build-demos.yml -> ./workflows/v2-build-demos.yml@dev

brownj85 and others added 17 commits February 28, 2025 14:07
…1352)

### Goal:
- To create timely PR previews when contributing or updating demos.

---

### Summary:
This pull request uses the new `v2-build-demos` and `v2-deploy-demos`
workflows to:

1. Build "modified" and new demos.
2. Save them as artifacts.
3. Deploy to the SWC database as previews.
4. Post a comment with preview links.

---

### Other changes:
- Improved descriptions of inputs for workflows.

---

### Testing:
I was required to fork the QML repo to push these workflows to `master`
as `workflow_run` uses the workflow context from `master`.

Therefore, you can take a look at the following ran actions:
https://github.com/Alan-eMartin/qml/actions

<img width="776" alt="Screenshot 2025-04-23 at 2 55 06 PM"
src="https://github.com/user-attachments/assets/06273e69-ea21-4162-aed7-2181e7aabfae"
/>

---------

Co-authored-by: Paul Finlay <[email protected]>
@Alan-eMartin Alan-eMartin changed the title crons added for bi-daily builds SC-85410 | V2 demos build on schedule May 1, 2025
Copy link
Collaborator

@ashishks0522 ashishks0522 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Alan-eMartin Alan-eMartin force-pushed the sc-85410-v2-demos-are-built-on-schedule branch from 7649946 to 3dd017d Compare May 6, 2025 12:42
Base automatically changed from v2 to master May 7, 2025 17:01
Comment on lines +13 to +21
uses: ./.github/workflows/v2-build-demos.yml
with:
ref: build-branch-dev
dev: true
save-artifact: true
artifact-name: build-branch-dev
keep-going: false
quiet: false
batch_size: 10

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI about 5 hours ago

To fix the issue, we will add a permissions block at the root level of the workflow. This block will define the minimal permissions required for the workflow to function securely. Based on the provided details, the workflow likely only needs contents: read permissions, as it appears to be a build process that does not modify repository contents or interact with other GitHub features.


Suggested changeset 1
.github/workflows/v2-build-branch-dev.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/v2-build-branch-dev.yml b/.github/workflows/v2-build-branch-dev.yml
--- a/.github/workflows/v2-build-branch-dev.yml
+++ b/.github/workflows/v2-build-branch-dev.yml
@@ -1,2 +1,4 @@
 name: V2 Build QML Branch - Dev
+permissions:
+  contents: read
 on:
EOF
@@ -1,2 +1,4 @@
name: V2 Build QML Branch - Dev
permissions:
contents: read
on:
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +13 to +21
uses: ./.github/workflows/v2-build-demos.yml
with:
ref: build-branch-master
dev: false
save-artifact: true
artifact-name: build-branch-master
keep-going: false
quiet: false
batch_size: 10

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI about 5 hours ago

To fix the issue, we will add a permissions block at the root level of the workflow. This block will define the least privileges required for the workflow to function. Since the workflow appears to be a build process, it likely only needs contents: read to access the repository's code. If additional permissions are required, they can be added based on the specific needs of the workflow.


Suggested changeset 1
.github/workflows/v2-build-branch-master.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/v2-build-branch-master.yml b/.github/workflows/v2-build-branch-master.yml
--- a/.github/workflows/v2-build-branch-master.yml
+++ b/.github/workflows/v2-build-branch-master.yml
@@ -1,2 +1,4 @@
 name: V2 Build QML Branch - Dev
+permissions:
+  contents: read
 on:
EOF
@@ -1,2 +1,4 @@
name: V2 Build QML Branch - Dev
permissions:
contents: read
on:
Copilot is powered by AI and may make mistakes. Always verify output.
Copy link
Collaborator

@rashidnhm rashidnhm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we want this merged after v2 is posting comments? Asking since this updates the README file

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0,2,4,6' # At 00:00 on Sunday, Tuesday, Thursday, and Saturday.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering why we're building on Saturday and Sunday? I know the core team works pretty hard but surely the Sunday build will be identical to the Saturday build no?

@@ -0,0 +1,21 @@
name: V2 Build QML Branch - Dev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: V2 Build QML Branch - Dev
name: V2 Build QML Branch - Master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants