diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edf74ee8..78f77e60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,9 +8,9 @@ on: required: false push: branches: - - "main" - - "canary" - - "experimental" + - main + - canary + - experimental jobs: start: @@ -19,7 +19,7 @@ jobs: permissions: contents: write id-token: write - if: startsWith(github.repository, 'storm-software/') && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/canary' || github.ref == 'refs/heads/experimental') + if: github.repository == 'storm-software/cyclone-ui' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/canary' || github.ref == 'refs/heads/experimental') steps: - name: Send notification - Deployment started uses: storm-software/action-notify@main @@ -63,7 +63,9 @@ jobs: - name: Setup workspace uses: storm-software/action-setup@main with: + package-manager: pnpm package-manager-version: 9.10.0 + storm-bot: Stormie-Bot storm-bot-github-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} - name: Build Cyclone-UI Nx-Plugin packages diff --git a/.github/workflows/cleanowners.yml b/.github/workflows/cleanowners.yml new file mode 100644 index 00000000..ca255804 --- /dev/null +++ b/.github/workflows/cleanowners.yml @@ -0,0 +1,23 @@ +--- +name: Weekly codeowners cleanup +on: + workflow_dispatch: + schedule: + - cron: "3 2 1 * *" + +permissions: + contents: read + +jobs: + cleanowners: + name: cleanowners + runs-on: ubuntu-latest + permissions: + issues: write + + steps: + - name: Run cleanowners action + uses: github/cleanowners@v1 + env: + GH_TOKEN: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} + ORGANIZATION: storm-software diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 77852403..93ba6cc6 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,10 +13,15 @@ name: "CodeQL" on: push: - branches: ["main"] + branches: + - main + - canary + - experimental pull_request: - # The branches below must be a subset of the branches above - branches: ["main"] + branches: + - main + - canary + - experimental schedule: - cron: "37 16 * * 6" diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.yml new file mode 100644 index 00000000..11f7141d --- /dev/null +++ b/.github/workflows/contributors.yml @@ -0,0 +1,42 @@ +name: Monthly contributor report +on: + workflow_dispatch: + schedule: + - cron: "3 2 1 * *" + +permissions: + issues: write + +jobs: + contributor_report: + name: contributor report + runs-on: ubuntu-latest + steps: + - name: Get dates for last month + shell: bash + run: | + # Calculate the first day of the previous month + start_date=$(date -d "last month" +%Y-%m-01) + + # Calculate the last day of the previous month + end_date=$(date -d "$start_date +1 month -1 day" +%Y-%m-%d) + + #Set an environment variable with the date range + echo "START_DATE=$start_date" >> "$GITHUB_ENV" + echo "END_DATE=$end_date" >> "$GITHUB_ENV" + + - name: Run contributor action + uses: github/contributors@v1 + env: + GH_TOKEN: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} + START_DATE: ${{ env.START_DATE }} + END_DATE: ${{ env.END_DATE }} + REPOSITORY: storm-software/cyclone-ui + + - name: Create issue + uses: peter-evans/create-issue-from-file@v5 + with: + title: Thank you Storm-Ops contributors (${{ env.START_DATE }}..${{ + env.END_DATE }}) + token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} + content-filepath: ./contributors.md diff --git a/.github/workflows/dependabot-update.yml b/.github/workflows/dependabot-update.yml new file mode 100644 index 00000000..849dbe9c --- /dev/null +++ b/.github/workflows/dependabot-update.yml @@ -0,0 +1,31 @@ +--- +name: Dependabot Update + +on: + pull_request: + types: + - opened + - synchronize + branches: + - dependabot + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: "${{secrets.STORM_BOT_GITHUB_TOKEN}}" + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: Fetch Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v2 + with: + github-token: "${{ secrets.STORM_BOT_GITHUB_TOKEN }}" + + - name: Approve Dependabot PRs + uses: storm-software/action-dependabot-approve@main diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index 7a2ec887..060a21d0 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -5,6 +5,8 @@ on: push: branches: - main + - canary + - experimental paths: - .github/labels.yml diff --git a/.github/workflows/schedule-stale.yml b/.github/workflows/schedule-stale.yml new file mode 100644 index 00000000..79529d4d --- /dev/null +++ b/.github/workflows/schedule-stale.yml @@ -0,0 +1,178 @@ +on: + schedule: + - cron: "0 0 * * *" + +name: Stale Bot workflow + +permissions: + issues: write + +jobs: + build: + if: ${{ github.repository_owner == 'storm-software' }} + permissions: + issues: write # to close stale issues (actions/stale) + pull-requests: write # to close stale PRs (actions/stale) + + name: stale + runs-on: ubuntu-latest + steps: + - name: stale-more-info-needed + id: stale-more-info-needed + uses: actions/stale@v9.0.0 + with: + repo-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} + days-before-stale: 14 + days-before-close: 14 + stale-issue-label: "stale" + operations-per-run: 300 + remove-stale-when-updated: true + only-labels: "blocked: more info needed" + stale-issue-message: | + This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. + If we missed this issue please reply to keep it active. + Thanks for being a part of the Storm Software community! ๐Ÿ™ + + - name: stale-needs-rebase + id: stale-needs-rebase + uses: actions/stale@v9.0.0 + with: + repo-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} + days-before-stale: 14 + days-before-close: 14 + stale-issue-label: "stale" + operations-per-run: 300 + remove-stale-when-updated: true + only-labels: "blocked: needs rebased" + stale-issue-message: | + This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. + If we missed this issue please reply to keep it active. + Thanks for being a part of the Storm Software community! ๐Ÿ™ + + - name: stale-repro-needed + id: stale-repro-needed + uses: actions/stale@v9.0.0 + with: + repo-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} + days-before-stale: 14 + days-before-close: 14 + stale-issue-label: "stale" + operations-per-run: 300 + remove-stale-when-updated: true + only-labels: "blocked: repro needed" + stale-issue-message: | + This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. + If we missed this issue please reply to keep it active. + Thanks for being a part of the Storm Software community! ๐Ÿ™ + + - name: stale-retry-with-latest + id: stale-retry-with-latest + uses: actions/stale@v9.0.0 + with: + repo-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} + days-before-stale: 14 + days-before-close: 14 + stale-issue-label: "stale" + operations-per-run: 300 + remove-stale-when-updated: true + only-labels: "blocked: retry with latest" + stale-issue-message: | + This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. + If we missed this issue please reply to keep it active. + Thanks for being a part of the Storm Software community! ๐Ÿ™ + + - name: stale-bug + id: stale-bug + uses: actions/stale@v9.0.0 + with: + repo-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} + days-before-stale: 180 + days-before-close: 14 + stale-issue-label: "stale" + operations-per-run: 300 + remove-stale-when-updated: true + only-labels: "type: bug" + stale-issue-message: | + This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. + If we missed this issue please reply to keep it active. + Thanks for being a part of the Storm Software community! ๐Ÿ™ + + - name: stale-cleanup + id: stale-cleanup + uses: actions/stale@v9.0.0 + with: + repo-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} + days-before-stale: 180 + days-before-close: 14 + stale-issue-label: "stale" + operations-per-run: 300 + remove-stale-when-updated: true + only-labels: "type: cleanup" + stale-issue-message: | + This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. + If we missed this issue please reply to keep it active. + Thanks for being a part of the Storm Software community! ๐Ÿ™ + + - name: stale-docs + id: stale-docs + uses: actions/stale@v9.0.0 + with: + repo-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} + days-before-stale: 180 + days-before-close: 14 + stale-issue-label: "stale" + operations-per-run: 300 + remove-stale-when-updated: true + only-labels: "type: docs" + stale-issue-message: | + This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. + If we missed this issue please reply to keep it active. + Thanks for being a part of the Storm Software community! ๐Ÿ™ + + - name: stale-enhancement + id: stale-enhancement + uses: actions/stale@v9.0.0 + with: + repo-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} + days-before-stale: 250 + days-before-close: 14 + stale-issue-label: "stale" + operations-per-run: 300 + remove-stale-when-updated: true + only-labels: "type: enhancement" + stale-issue-message: | + This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. + If we missed this issue please reply to keep it active. + Thanks for being a part of the Storm Software community! ๐Ÿ™ + + - name: stale-feature + id: stale-feature + uses: actions/stale@v9.0.0 + with: + repo-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} + days-before-stale: 250 + days-before-close: 14 + stale-issue-label: "stale" + operations-per-run: 300 + remove-stale-when-updated: true + only-labels: "type: feature" + stale-issue-message: | + This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. + If we missed this issue please reply to keep it active. + Thanks for being a part of the Storm Software community! ๐Ÿ™ + + - name: stale-question + id: stale-question + uses: actions/stale@v9.0.0 + with: + repo-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} + days-before-stale: 45 + days-before-close: 14 + stale-issue-label: "stale" + operations-per-run: 300 + remove-stale-when-updated: true + only-labels: "type: question / discussion" + stale-issue-message: | + This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. + If we missed this issue please reply to keep it active. + Thanks for being a part of the Storm Software community! ๐Ÿ™ diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml new file mode 100644 index 00000000..4e9f20ab --- /dev/null +++ b/.github/workflows/sync-labels.yml @@ -0,0 +1,31 @@ +--- +name: Sync labels + +on: + push: + branches: + - main + - canary + - experimental + paths: + - .github/labels.yml + +env: + CI: true + NX_DAEMON: false + NX_VERBOSE_LOGGING: true + SKIP_ENV_VALIDATION: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + labels: + name: โ™ป๏ธ Sync labels + runs-on: ubuntu-latest + steps: + - name: โคต๏ธ Check out code from GitHub + uses: actions/checkout@v4 + - name: ๐Ÿš€ Run Label Syncer + uses: micnncim/action-label-syncer@v1.3.0 + env: + GITHUB_TOKEN: ${{ secrets.STORM_BOT_GITHUB_TOKEN }}