-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pin GHA versions #2679
Open
sergejparity
wants to merge
5
commits into
main
Choose a base branch
from
sk-pin-gha-versions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+24
−24
Open
Pin GHA versions #2679
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
40f23f5
pin gha versions
sergejparity e3fab69
revert action-rs clippy version
sergejparity 43a817e
pin clippy to commit
sergejparity fb859d5
Merge branch 'main' into sk-pin-gha-versions
sergejparity 0795526
Merge branch 'main' into sk-pin-gha-versions
sergejparity File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ jobs: | |
image: rust:1.61 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # v2.0.0 | ||
- run: RUSTFLAGS=-Dwarnings cargo test --locked --workspace --all-features | ||
|
||
test-32bits: | ||
|
@@ -40,7 +40,7 @@ jobs: | |
steps: | ||
- run: apt-get update && apt install -y libc6-dev-i386 | ||
- uses: actions/checkout@v3 | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # v2.0.0 | ||
- run: rustup target add i686-unknown-linux-gnu | ||
- run: RUSTFLAGS=-Dwarnings cargo test --target i686-unknown-linux-gnu --locked --workspace --all-features | ||
|
||
|
@@ -51,11 +51,11 @@ jobs: | |
steps: | ||
- run: apt-get update && apt install -y binaryen # For `wasm-opt` | ||
- uses: actions/checkout@v3 | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # v2.0.0 | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: '12' # An old version is used to ensure compatibility | ||
- uses: denoland/setup-deno@v1 | ||
- uses: denoland/setup-deno@004814556e37c54a2f6e31384c9e18e983317366 # v1.1.0 | ||
with: | ||
deno-version: v1.x | ||
- run: cd bin/wasm-node/javascript && RUSTFLAGS=-Dwarnings npm install-ci-test | ||
|
@@ -69,11 +69,11 @@ jobs: | |
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Necessary to fetch pull request base below | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # v2.0.0 | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: '14' # Because this step doesn't actually check anything, we use a more liberal version | ||
- uses: baptiste0928/cargo-install@v1 # This action ensures that the twiggy compilation is cached. | ||
- uses: baptiste0928/cargo-install@bf6758885262d0e6f61089a9d8c8790d3ac3368f # v1.3.0 # This action ensures that the twiggy compilation is cached. | ||
with: | ||
crate: twiggy | ||
version: 0.6 | ||
|
@@ -101,7 +101,7 @@ jobs: | |
image: rust:1.61 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # v2.0.0 | ||
- run: RUSTFLAGS=-Dwarnings cargo check --package smoldot --locked --no-default-features | ||
- run: RUSTFLAGS=-Dwarnings cargo check --package smoldot --locked --no-default-features --features database-sqlite | ||
- run: RUSTFLAGS=-Dwarnings cargo check --package smoldot --locked --no-default-features --features std | ||
|
@@ -120,10 +120,10 @@ jobs: | |
# is completely arbitrary. | ||
toolchain: nightly-2022-06-05 | ||
override: true | ||
- uses: baptiste0928/cargo-install@v1 # This action ensures that the compilation is cached. | ||
- uses: baptiste0928/cargo-install@bf6758885262d0e6f61089a9d8c8790d3ac3368f # v1.3.0 # This action ensures that the compilation is cached. | ||
with: | ||
crate: cargo-fuzz | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # v2.0.0 | ||
with: | ||
working-directory: ./bin/fuzz | ||
- run: cargo fuzz build --fuzz-dir ./bin/fuzz | ||
|
@@ -134,7 +134,7 @@ jobs: | |
image: rust:1.61 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # v2.0.0 | ||
- run: cargo doc --verbose --workspace --all-features --no-deps --document-private-items | ||
|
||
fmt: | ||
|
@@ -167,8 +167,8 @@ jobs: | |
toolchain: nightly | ||
components: clippy | ||
override: true | ||
- uses: Swatinem/rust-cache@v1 # Note that this is done after switching the compiler version to nightly | ||
- uses: actions-rs/clippy@master | ||
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # v2.0.0 # Note that this is done after switching the compiler version to nightly | ||
- uses: actions-rs/clippy@9e02862195d5c88dabdda3c1e7fa53a45ed35ec1 # action is in development stage pinned to latest good version | ||
with: | ||
args: --all-features --all-targets | ||
|
||
|
@@ -182,7 +182,7 @@ jobs: | |
- bans licenses sources | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 | ||
- uses: EmbarkStudios/cargo-deny-action@7257a18a9c2fe3f92b85d41ae473520dff953c97 # v1.3.2 | ||
with: | ||
command: check --config .github/cargo-deny.toml ${{ matrix.checks }} | ||
arguments: --workspace --all-features | ||
|
@@ -191,7 +191,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: baptiste0928/cargo-install@v1 # This action ensures that the compilation is cached. | ||
- uses: baptiste0928/cargo-install@bf6758885262d0e6f61089a9d8c8790d3ac3368f # v1.3.0 # This action ensures that the compilation is cached. | ||
with: | ||
crate: cargo-spellcheck | ||
version: 0.11.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ jobs: | |
- uses: docker/setup-qemu-action@v2 | ||
- uses: docker/setup-buildx-action@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: docker/login-action@v2 | ||
- uses: docker/login-action@v2 | ||
# This `if` adds an additional safety against accidental pushes. | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
with: | ||
|
@@ -61,12 +61,12 @@ jobs: | |
# Ideally we don't want to install any toolchain, but the GH action doesn't support this. | ||
toolchain: stable | ||
profile: minimal | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # v2.0.0 | ||
- run: npm install | ||
working-directory: ./bin/wasm-node/javascript | ||
- run: npm publish --unsafe-perm --dry-run | ||
working-directory: ./bin/wasm-node/javascript | ||
- uses: JS-DevTools/npm-publish@v1 | ||
- uses: JS-DevTools/npm-publish@0f451a94170d1699fd50710966d48fb26194d939 # v1.4.3 | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
# Warning: this GitHub action doesn't seem to run prepublish scripts, hence | ||
# the `npm publish --dry-run` done right above is important to ensure this. | ||
|
@@ -86,7 +86,7 @@ jobs: | |
- uses: actions/[email protected] | ||
with: | ||
node-version: 12 | ||
- uses: denoland/setup-deno@v1 | ||
- uses: denoland/setup-deno@004814556e37c54a2f6e31384c9e18e983317366 # v1.1.0 | ||
with: | ||
deno-version: v1.x | ||
- run: sudo apt-get update && sudo apt install -y binaryen # For `wasm-opt` | ||
|
@@ -95,7 +95,7 @@ jobs: | |
# Ideally we don't want to install any toolchain, but the GH action doesn't support this. | ||
toolchain: stable | ||
profile: minimal | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # v2.0.0 | ||
- id: compute-tag # Compute the tag that we might push. | ||
run: echo "::set-output name=tag::light-js-deno-v`jq -r .version ./bin/wasm-node/javascript/package.json`" | ||
- id: check-tag-exists # Check whether the tag already exists. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious: why not pin to
v2.0.0
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's pretty simple. When you point to the tag, then in case if GHA repo will get compromised (which is out of our control), tag can be easily moved to another commit, branch etc. opening the gate for some malicious manipulations - like the one described here. And we will not even get notified about such events.
With the hash such things will not work.
Yes, it might be not so convenient, but it is an eternal trade off - security vs convenience.
Also dependabot can track GHA updates by the hash as well.