diff --git a/.github/workflows/aql/wpilib-generic-gradle-cache_unused.aql b/.github/workflows/aql/wpilib-generic-gradle-cache_unused.aql new file mode 100644 index 00000000000..e55f8a4674e --- /dev/null +++ b/.github/workflows/aql/wpilib-generic-gradle-cache_unused.aql @@ -0,0 +1,20 @@ +{ + "files": [ + { + "aql": { + "items.find": { + "repo": "wpilib-generic-gradlecache", + "$or":[ + { + "stat.downloaded": { "$before":"1mo" } + }, + { + "stat.downloaded": { "$eq":null } + } + ], + "created": { "$before":"1mo" } + } + } + } + ] +} \ No newline at end of file diff --git a/.github/workflows/aql/wpilib-mvn-development_unused.aql b/.github/workflows/aql/wpilib-mvn-development_unused.aql new file mode 100644 index 00000000000..c807092c331 --- /dev/null +++ b/.github/workflows/aql/wpilib-mvn-development_unused.aql @@ -0,0 +1,29 @@ +{ + "files": [ + { + "aql": { + "items.find": { + "repo": "wpilib-mvn-development", + "path": { "$nmatch":"*edu/wpi/first/thirdparty*" }, + "$or":[ + { + "artifact.module.build.name": { "$eq":"allwpilib" } + }, + { + "artifact.module.build.name": { "$eq":"combiner" } + } + ], + "$or":[ + { + "stat.downloaded": { "$before":"3mo" } + }, + { + "stat.downloaded": { "$eq":null } + } + ], + "created": { "$before":"3mo" } + } + } + } + ] +} \ No newline at end of file diff --git a/.github/workflows/artifactory-nightly-cleanup.yml b/.github/workflows/artifactory-nightly-cleanup.yml new file mode 100644 index 00000000000..cda5b5f40c1 --- /dev/null +++ b/.github/workflows/artifactory-nightly-cleanup.yml @@ -0,0 +1,33 @@ +name: Artifactory Nightly Cleanup + +on: + workflow_dispatch: + schedule: + - cron: '15 2 * * *' + +jobs: + wpilib-mvn-development_unused_cleanup: + runs-on: ubuntu-latest + if: github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main' + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: jfrog/setup-jfrog-cli@v4 + env: + JF_ENV_1: !! REPLACE ME !! + - name: Cleanup + run: jf rt del --spec=.github/workflows/aql/wpilib-mvn-development_unused.aql + + wpilib-generic-gradle-cache_unused_cleanup: + runs-on: ubuntu-latest + if: github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main' + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: jfrog/setup-jfrog-cli@v4 + env: + JF_ENV_1: !! REPLACE ME !! + - name: Cleanup + run: jf rt del --spec=.github/workflows/aql/wpilib-generic-gradle-cache_unused.aql \ No newline at end of file