From 9a09f3dfbb8aa21db0edee3a83d98d8ea5b1fc0d Mon Sep 17 00:00:00 2001 From: ClementTsang Date: Wed, 22 Dec 2021 16:51:45 -0500 Subject: [PATCH] ci: Use commit hash for some actions to pin them --- .github/workflows/ci.yml | 34 ++++++++++++++++---------------- .github/workflows/coverage.yml | 6 +++--- .github/workflows/deployment.yml | 18 ++++++++--------- .github/workflows/nightly.yml | 20 +++++++++---------- .github/workflows/test-docs.yml | 2 +- 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47a1afdc..9b7be5c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - windows-2019 steps: - id: skip_check - uses: fkirc/skip-duplicate-actions@master + uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e with: concurrent_skipping: "same_content_newer" skip_after_successful_duplicate: "true" @@ -35,7 +35,7 @@ jobs: - uses: actions/checkout@v2 if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - - uses: actions-rs/toolchain@v1 + - uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # 1.0.6 if: ${{ steps.skip_check.outputs.should_skip != 'true' }} with: profile: minimal @@ -43,7 +43,7 @@ jobs: override: true components: rustfmt - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0 if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - run: cargo fmt --all -- --check @@ -60,7 +60,7 @@ jobs: - windows-2019 steps: - id: skip_check - uses: fkirc/skip-duplicate-actions@master + uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e with: concurrent_skipping: "same_content_newer" skip_after_successful_duplicate: "true" @@ -70,7 +70,7 @@ jobs: - uses: actions/checkout@v2 if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - - uses: actions-rs/toolchain@v1 + - uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # 1.0.6 if: ${{ steps.skip_check.outputs.should_skip != 'true' }} with: profile: minimal @@ -78,7 +78,7 @@ jobs: override: true components: clippy - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0 if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - run: cargo clippy --all-targets --workspace -- -D warnings @@ -193,7 +193,7 @@ jobs: steps: - id: skip_check - uses: fkirc/skip-duplicate-actions@master + uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e with: concurrent_skipping: "same_content_newer" skip_after_successful_duplicate: "true" @@ -205,21 +205,21 @@ jobs: - name: Install toolchain if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - uses: actions-rs/toolchain@v1 + uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # 1.0.6 with: profile: minimal toolchain: ${{ matrix.triple.rust }} override: true target: ${{ matrix.triple.target }} - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0 if: ${{ steps.skip_check.outputs.should_skip != 'true' }} with: key: ${{ matrix.triple.target }} - name: Check if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - uses: actions-rs/cargo@v1 + uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # 1.0.1 with: command: check args: --all-targets --verbose --target=${{ matrix.triple.target }} --features "battery" @@ -255,7 +255,7 @@ jobs: steps: - id: skip_check - uses: fkirc/skip-duplicate-actions@master + uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e with: concurrent_skipping: "same_content_newer" skip_after_successful_duplicate: "true" @@ -267,21 +267,21 @@ jobs: - name: Install toolchain if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - uses: actions-rs/toolchain@v1 + uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # 1.0.6 with: profile: minimal toolchain: ${{ matrix.triple.rust }} override: true target: ${{ matrix.triple.target }} - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0 if: ${{ steps.skip_check.outputs.should_skip != 'true' }} with: key: ${{ matrix.triple.target }} - name: Check without battery feature on the main 3 if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - uses: actions-rs/cargo@v1 + uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # 1.0.1 with: command: check args: --all-targets --verbose --target=${{ matrix.triple.target }} --no-default-features @@ -317,7 +317,7 @@ jobs: steps: - id: skip_check - uses: fkirc/skip-duplicate-actions@master + uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e with: concurrent_skipping: "same_content_newer" skip_after_successful_duplicate: "true" @@ -329,14 +329,14 @@ jobs: - name: Install toolchain if: ${{ steps.skip_check.outputs.should_skip != 'true' }} - uses: actions-rs/toolchain@v1 + uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # 1.0.6 with: profile: minimal toolchain: ${{ matrix.triple.rust }} override: true target: ${{ matrix.triple.target }} - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0 if: ${{ steps.skip_check.outputs.should_skip != 'true' }} with: key: ${{ matrix.triple.target }} diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 9699ef0e..d2dea26b 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -16,7 +16,7 @@ jobs: should_skip: ${{ steps.skip_check.outputs.should_skip }} steps: - id: skip_check - uses: fkirc/skip-duplicate-actions@master + uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e with: concurrent_skipping: "same_content_newer" skip_after_successful_duplicate: "true" @@ -34,7 +34,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0 with: key: ${{ matrix.triple.target }} @@ -43,6 +43,6 @@ jobs: cargo tarpaulin --verbose --all-features --workspace --run-types AllTargets --timeout 120 --out Xml - name: Upload to codecov.io - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # 2.1.0 with: fail_ci_if_error: true diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 9e0d2c87..91c55949 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -140,19 +140,19 @@ jobs: fetch-depth: 1 - name: Install toolchain - uses: actions-rs/toolchain@v1 + uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # 1.0.6 with: profile: minimal toolchain: stable override: true target: ${{ matrix.triple.target }} - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0 with: key: ${{ matrix.triple.target }} - name: Build - uses: actions-rs/cargo@v1 + uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # 1.0.1 with: command: build args: --release --verbose --target=${{ matrix.triple.target }} --features "battery" @@ -243,19 +243,19 @@ jobs: run: Install-WindowsFeature Net-Framework-Core - name: Install wixtoolset (Windows x86-64 MSVC) - uses: crazy-max/ghaction-chocolatey@v1.4.0 + uses: crazy-max/ghaction-chocolatey@87d06bbbd2cfb1835f1820042d356aef4875fb5f # 1.6.0 with: args: install -y wixtoolset - name: Install toolchain - uses: actions-rs/toolchain@v1 + uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # 1.0.6 with: profile: minimal toolchain: stable override: true target: x86_64-pc-windows-msvc - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0 with: key: x86_64-pc-windows-msvc-msi @@ -315,14 +315,14 @@ jobs: echo "Release version: ${{ env.RELEASE_VERSION }}" - name: Install toolchain - uses: actions-rs/toolchain@v1 + uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # 1.0.6 with: profile: minimal toolchain: stable override: true target: x86_64-unknown-linux-gnu - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0 with: key: x86_64-unknown-linux-gnu-deb @@ -429,7 +429,7 @@ jobs: ls ./release - name: Upload all saved release files - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@17cd0d34deddf848fc0e7d9be5202c148c270a0a # 0.1.14 with: token: ${{ secrets.GITHUB_TOKEN }} prerelease: false diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c1f7f8da..dc856e38 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -136,19 +136,19 @@ jobs: fetch-depth: 1 - name: Install toolchain - uses: actions-rs/toolchain@v1 + uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # 1.0.6 with: profile: minimal toolchain: stable override: true target: ${{ matrix.triple.target }} - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0 with: key: ${{ matrix.triple.target }} - name: Build - uses: actions-rs/cargo@v1 + uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # 1.0.1 with: command: build args: --release --verbose --target=${{ matrix.triple.target }} --features "battery" @@ -237,19 +237,19 @@ jobs: run: Install-WindowsFeature Net-Framework-Core - name: Install wixtoolset - uses: crazy-max/ghaction-chocolatey@v1.4.0 + uses: crazy-max/ghaction-chocolatey@87d06bbbd2cfb1835f1820042d356aef4875fb5f # 1.6.0 with: args: install -y wixtoolset - name: Install toolchain - uses: actions-rs/toolchain@v1 + uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # 1.0.6 with: profile: minimal toolchain: stable override: true target: x86_64-pc-windows-msvc - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0 with: key: x86_64-pc-windows-msvc-msi @@ -302,14 +302,14 @@ jobs: echo "Release version: ${{ env.RELEASE_VERSION }}" - name: Install toolchain - uses: actions-rs/toolchain@v1 + uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # 1.0.6 with: profile: minimal toolchain: stable override: true target: x86_64-unknown-linux-gnu - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0 with: key: x86_64-unknown-linux-gnu-deb @@ -349,7 +349,7 @@ jobs: ls ./release - name: Delete tag and release - uses: dev-drprasad/delete-tag-and-release@v0.1.3 + uses: dev-drprasad/delete-tag-and-release@085c6969f18bad0de1b9f3fe6692a3cd01f64fe5 # 0.2.0 if: github.event.inputs.isMock != 'mock' with: delete_release: true @@ -362,7 +362,7 @@ jobs: if: github.event.inputs.isMock != 'mock' - name: Upload all saved release files if not mock - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@17cd0d34deddf848fc0e7d9be5202c148c270a0a # 0.1.14 if: github.event.inputs.isMock != 'mock' with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml index f02baad3..7caba9d6 100644 --- a/.github/workflows/test-docs.yml +++ b/.github/workflows/test-docs.yml @@ -10,7 +10,7 @@ jobs: should_skip: ${{ steps.skip_check.outputs.should_skip }} steps: - id: skip_check - uses: fkirc/skip-duplicate-actions@master + uses: fkirc/skip-duplicate-actions@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e with: skip_after_successful_duplicate: "true" paths: '["docs/**", ".github/workflows/docs.yml"]'