This is an automated email from the ASF dual-hosted git repository. jamesnetherton pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push: new 0ba78ce Set retention-days parameter on upload-artifact action 0ba78ce is described below commit 0ba78cec95a94db46e290a54edd5a02a50596c4e Author: James Netherton <jamesnether...@gmail.com> AuthorDate: Wed Oct 21 07:20:56 2020 +0100 Set retention-days parameter on upload-artifact action --- .github/workflows/camel-master-cron.yaml | 7 +++-- .github/workflows/ci-build.yaml | 19 ++++++------ .github/workflows/purge-stale-artifacts-cron.yaml | 38 ----------------------- .github/workflows/quarkus-master-cron.yaml | 7 +++-- 4 files changed, 18 insertions(+), 53 deletions(-) diff --git a/.github/workflows/camel-master-cron.yaml b/.github/workflows/camel-master-cron.yaml index 3182420..72874d5 100644 --- a/.github/workflows/camel-master-cron.yaml +++ b/.github/workflows/camel-master-cron.yaml @@ -72,10 +72,11 @@ jobs: shell: bash run: tar -czvf maven-repo.tgz -C ~ build-data .m2/repository - name: Persist Maven Repo - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v2 with: name: maven-repo path: maven-repo.tgz + retention-days: 1 - name: Setup Native Test Matrix id: set-native-matrix run: | @@ -102,7 +103,7 @@ jobs: matrix: ${{ fromJson(needs.build.outputs.matrix) }} steps: - name: Download Maven Repo - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v2 with: name: maven-repo path: . @@ -163,7 +164,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download Maven Repo - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v2 with: name: maven-repo path: . diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml index c5f6b6d..831c17c 100644 --- a/.github/workflows/ci-build.yaml +++ b/.github/workflows/ci-build.yaml @@ -93,14 +93,15 @@ jobs: - name: Tar Maven Repo shell: bash run: | - tar -czf ../maven-repo.tgz -C ~ .m2/repository - ls -lh ../maven-repo.tgz + tar -czf ${{ runner.temp }}/maven-repo.tgz -C ~ .m2/repository + ls -lh ${{ runner.temp }}/maven-repo.tgz df -h / - name: Persist Maven Repo - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v2 with: name: maven-repo - path: ../maven-repo.tgz + path: ${{ runner.temp }}/maven-repo.tgz + retention-days: 1 - name: Setup Native Test Matrix id: set-native-matrix run: | @@ -133,7 +134,7 @@ jobs: with: version: '11' - name: Download Maven Repo - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v2 with: name: maven-repo path: .. @@ -202,7 +203,7 @@ jobs: with: version: ${{ matrix.java }} - name: Download Maven Repo - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v2 with: name: maven-repo path: .. @@ -255,7 +256,7 @@ jobs: with: version: ${{ matrix.java }} - name: Download Maven Repo - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v2 with: name: maven-repo path: .. @@ -297,7 +298,7 @@ jobs: with: version: ${{ matrix.java }} - name: Download Maven Repo - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v2 with: name: maven-repo path: .. @@ -346,7 +347,7 @@ jobs: with: version: ${{ matrix.java }} - name: Download Maven Repo - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v2 with: name: maven-repo path: .. diff --git a/.github/workflows/purge-stale-artifacts-cron.yaml b/.github/workflows/purge-stale-artifacts-cron.yaml deleted file mode 100644 index 07510e6..0000000 --- a/.github/workflows/purge-stale-artifacts-cron.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -name: Purge Stale Build Artifacts - -on: - schedule: - # Run every 4 hours - - cron: '0 */4 * * *' - -jobs: - purge-stale-build-artifacts: - if: github.repository == 'apache/camel-quarkus' - runs-on: ubuntu-latest - steps: - - name: Purge Stale Artifacts - run: | - TWELVE_HOURS_AGO="$(date --iso-8601=seconds -d "-12 hours" | cut -f1 -d'+')Z" - ARTIFACTS=$(curl -s -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/artifacts) - for ID in $(echo ${ARTIFACTS} | jq --arg twelveHoursAgo ${TWELVE_HOURS_AGO} '.artifacts[] | select (.expired == false and .name == "maven-repo" and .created_at <= $twelveHoursAgo) | .id'); do - echo "Deleting artifact ${ID} from ${GITHUB_REPOSITORY}" - curl -s -X DELETE -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/artifacts/${ID} - sleep 5 - done diff --git a/.github/workflows/quarkus-master-cron.yaml b/.github/workflows/quarkus-master-cron.yaml index 6f029b5..a745dd2 100644 --- a/.github/workflows/quarkus-master-cron.yaml +++ b/.github/workflows/quarkus-master-cron.yaml @@ -81,10 +81,11 @@ jobs: ls -lh maven-repo.tgz df -h - name: Persist Maven Repo - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v2 with: name: maven-repo path: maven-repo.tgz + retention-days: 1 - name: Setup Native Test Matrix id: set-native-matrix run: | @@ -111,7 +112,7 @@ jobs: matrix: ${{ fromJson(needs.build.outputs.matrix) }} steps: - name: Download Maven Repo - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v2 with: name: maven-repo path: . @@ -172,7 +173,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download Maven Repo - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v2 with: name: maven-repo path: .