diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f044092d90..404ba07cfc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,11 @@ on: workflow_dispatch: inputs: + summary: + description: 'Release Summary' + required: false + type: string + default: '' publish: description: 'Create Production Release' required: true @@ -15,15 +20,15 @@ on: description: 'Skip Tests' required: true type: boolean + updatecoverage: + description: 'Update Baseline Coverage' + default: true + required: true + type: boolean dryrun: description: 'Dry Run' required: true type: boolean - summary: - description: 'Summary' - required: false - type: string - default: '' jobs: # ----------------------------------------------------------------- @@ -307,6 +312,19 @@ jobs: body: ${{ steps.covprocess.outputs.changelog }} artifacts: "/home/runner/work/release/release.tar.gz,coverage.json,historical-coverage.json" token: ${{ secrets.GITHUB_TOKEN }} + + - name: Update Baseline Coverage + uses: ncipollo/release-action@v1 + if: ${{ github.event.inputs.updatecoverage == 'true' && github.event.inputs.dryrun == 'false' }} + with: + allowUpdates: true + tag: baseline + omitBodyDuringUpdate: true + omitNameDuringUpdate: true + omitPrereleaseDuringUpdate: true + replacesArtifacts: true + artifacts: "coverage.json" + token: ${{ secrets.GITHUB_TOKEN }} - name: Upload Build Artifacts uses: actions/upload-artifact@v2.3.1 diff --git a/dev/tests/prepare.sh b/dev/tests/prepare.sh index 811a5ec9a7..2fb7cf7c95 100644 --- a/dev/tests/prepare.sh +++ b/dev/tests/prepare.sh @@ -17,4 +17,4 @@ echo "Creating data directories..." chmod +x ./docker/scripts/app-create-dirs.sh ./docker/scripts/app-create-dirs.sh echo "Fetching latest coverage results file..." -curl -fsSL https://github.com/ietf-tools/datatracker/releases/latest/download/coverage.json -o release-coverage.json +curl -fsSL https://github.com/ietf-tools/datatracker/releases/download/baseline/coverage.json -o release-coverage.json diff --git a/docker/scripts/app-init.sh b/docker/scripts/app-init.sh index 81811beab3..bd3d51a98a 100755 --- a/docker/scripts/app-init.sh +++ b/docker/scripts/app-init.sh @@ -82,7 +82,7 @@ chmod +x ./docker/scripts/app-create-dirs.sh # Download latest coverage results file echo "Downloading latest coverage results file..." -curl -fsSL https://github.com/ietf-tools/datatracker/releases/latest/download/coverage.json -o release-coverage.json +curl -fsSL https://github.com/ietf-tools/datatracker/releases/download/baseline/coverage.json -o release-coverage.json # Wait for DB container