From 822401d23bf4f5b30e21ea1f7e3663c33069c5e5 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 19 Dec 2021 20:12:45 -0800 Subject: [PATCH] Use major version ref of `carlosperate/download-file-action` The `carlosperate/download-file-action` action is used by GitHub Actions workflows as a convenient way to download external resources. A major version ref has been added to that repository. It will always point to the latest release of the "1" major version series. This means it is no longer necessary to do a full pin of the action version in use as before. Use of the major version ref will cause the workflow to use a stable version of the action, while also benefiting from ongoing development to the action up until such time as a new major release of an action is made. At that time we would need to evaluate whether any changes to the workflow are required by the breaking change that triggered the major release before manually updating the major ref (e.g., uses: `carlosperate/download-file-action@v2`). I think this approach strikes the right balance between stability and maintainability for these workflows. --- .github/workflows/check-workflows.yml | 2 +- .github/workflows/manage-prs.yml | 2 +- .github/workflows/sync-labels.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-workflows.yml b/.github/workflows/check-workflows.yml index b15b1d13..1eb3dab2 100644 --- a/.github/workflows/check-workflows.yml +++ b/.github/workflows/check-workflows.yml @@ -26,7 +26,7 @@ jobs: - name: Download JSON schema for GitHub Actions workflows id: download-schema - uses: carlosperate/download-file-action@v1.0.3 + uses: carlosperate/download-file-action@v1 with: # See: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/github-workflow.json file-url: https://json.schemastore.org/github-workflow diff --git a/.github/workflows/manage-prs.yml b/.github/workflows/manage-prs.yml index ea2b1516..3db299d8 100644 --- a/.github/workflows/manage-prs.yml +++ b/.github/workflows/manage-prs.yml @@ -138,7 +138,7 @@ jobs: - name: Download submission parser id: download-parser - uses: carlosperate/download-file-action@v1.0.3 + uses: carlosperate/download-file-action@v1 with: file-url: https://github.com/arduino/library-registry-submission-parser/releases/download/${{ env.SUBMISSION_PARSER_VERSION }}/parser location: ${{ runner.temp }} diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index fe53570f..3ee6febd 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -31,7 +31,7 @@ jobs: - name: Download JSON schema for labels configuration file id: download-schema - uses: carlosperate/download-file-action@v1.0.3 + uses: carlosperate/download-file-action@v1 with: file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/arduino-tooling-gh-label-configuration-schema.json location: ${{ runner.temp }}/label-configuration-schema @@ -65,7 +65,7 @@ jobs: steps: - name: Download - uses: carlosperate/download-file-action@v1.0.3 + uses: carlosperate/download-file-action@v1 with: file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }}