generated from roboflow/template-python
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
1,601 additions
and
426 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# These owners will be the default owners for everything in | ||
# the repo. They will be requested for review when someone | ||
# opens a pull request. | ||
* @SkalskiP @onuralpszr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,42 @@ | ||
|
||
name: Clear cache | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 1 * *' | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 1 * *" # Run at midnight on the first day of every month | ||
workflow_dispatch: | ||
|
||
# Restrict permissions by default | ||
permissions: | ||
actions: write | ||
actions: write # Required for cache management | ||
|
||
jobs: | ||
clear-cache: | ||
name: Clear cache | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Clear cache | ||
uses: actions/github-script@v7 | ||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | ||
with: | ||
script: | | ||
console.log("About to clear") | ||
console.log("Starting cache cleanup...") | ||
const caches = await github.rest.actions.getActionsCacheList({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
}) | ||
let deletedCount = 0 | ||
for (const cache of caches.data.actions_caches) { | ||
console.log(cache) | ||
github.rest.actions.deleteActionsCacheById({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
cache_id: cache.id, | ||
}) | ||
console.log(`Deleting cache: ${cache.key} (${cache.size_in_bytes} bytes)`) | ||
try { | ||
await github.rest.actions.deleteActionsCacheById({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
cache_id: cache.id, | ||
}) | ||
deletedCount++ | ||
} catch (error) { | ||
console.error(`Failed to delete cache ${cache.key}: ${error.message}`) | ||
} | ||
} | ||
console.log("Clear completed") | ||
console.log(`Cache cleanup completed. Deleted ${deletedCount} caches.`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Combine Dependabot PRs | ||
|
||
on: | ||
schedule: | ||
- cron: "0 1 * * 3" # Wednesday at 01:00 | ||
workflow_dispatch: # allows you to manually trigger the workflow | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
checks: read | ||
|
||
jobs: | ||
combine-prs: | ||
name: Combine | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: combine-prs | ||
id: combine-prs | ||
uses: github/combine-prs@2909f404763c3177a456e052bdb7f2e85d3a7cb3 # v5.2.0 | ||
with: | ||
labels: combined-pr |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build and Publish Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
# Ensure only one concurrent deployment | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.ref}} | ||
cancel-in-progress: true | ||
|
||
# Restrict permissions by default | ||
permissions: | ||
contents: write # Required for committing to gh-pages | ||
pages: write # Required for deploying to Pages | ||
pull-requests: write # Required for PR comments | ||
|
||
jobs: | ||
deploy: | ||
name: Publish Docs | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
steps: | ||
- name: 📥 Checkout the repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: 🐍 Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: 📜 Setup Poetry | ||
uses: abatilo/actions-poetry@e78f54a89cb052fff327414dd9ff010b5d2b4dbd # v3.0.1 | ||
|
||
- name: 📦 Install dependencies | ||
run: | | ||
poetry install --with=docs | ||
- name: ⚙️ Configure git for github-actions | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
- name: 🚀 Deploy Development Docs | ||
if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch' | ||
run: | | ||
MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} poetry run mike deploy --push develop | ||
- name: 🚀 Deploy Release Docs | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
run: | | ||
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`) | ||
MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} poetry run mike deploy --push --update-aliases $latest_tag latest |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.