--- /dev/null
+name: delete package with spec
+description: delete packages using spec json file
+
+inputs:
+ spec_path:
+ description: path of spec file
+ required: true
+ art_id:
+ description: artifactory id
+ required: true
+ art_pw:
+ description: artifactory password
+ required: true
+
+runs:
+ using: composite
+ steps:
+ - run : |
+ jf c add art --artifactory-url https://art.sec.samsung.net/artifactory --user ${{ inputs.art_id }} --password ${{ inputs.art_pw }} --interactive=false
+ jf rt del --spec=${{ inputs.spec_path }}
+ shell: bash
--- /dev/null
+{
+ "files": [
+ {
+ "aql": {
+ "items.find": {
+ "repo": {"$eq":"aip_generic"},
+ "path": {"$match":"*NPU_SystemService*"},
+ "name": {"$match":"*"},
+ "type" : "any",
+ "created": { "$before":"3weeks" }
+ }
+ }
+ }
+ ]
+}
--- /dev/null
+name: delete old package
+
+on:
+ schedule:
+ # scheduled workflow run on the latest commit on the default or base
+ # branch.
+ - cron: '00 01 * * 0-5'
+
+env:
+ ART_ID: ${{ secrets.ARTIFACTORY_ID }}
+ ART_PW: ${{ secrets.ARTIFACTORY_PW }}
+
+jobs:
+ delete-old-package:
+ runs-on: [ code-large ]
+ container:
+ image: art.sec.samsung.net/aip_docker/n2s2_docker/bionic:latest
+ # for chroot-based build system
+ options: --privileged
+
+ timeout-minutes: 30
+
+ steps:
+ - name: Clone your repository
+ uses: CODE-Actions/checkout@v2
+ - name: Delete old pacakges
+ uses: ./.github/actions/delete-package-with-spec
+ with:
+ spec_path: $GITHUB_WORKSPACE/.github/actions/delete-package-with-spec/before3weeks.json
+ art_id: $ART_ID
+ art_pw: $ART_PW