Skip to content

Commit

Permalink
fix: use environment so pull requests from other fork can run ci
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys committed Nov 23, 2023
1 parent 2192cc7 commit 818be16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ concurrency:
# If this is enabled it will cancel current running and start latest
cancel-in-progress: true

env:
RUST_TOOLCHAIN: 1.73.0

jobs:
tests:
runs-on: ubuntu-latest
Expand All @@ -35,7 +38,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ vars.RUST_TOOLCHAIN }}
toolchain: ${{ env.RUST_TOOLCHAIN }}

- name: Sccache cache
uses: mozilla-actions/[email protected]
Expand Down Expand Up @@ -86,11 +89,11 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ vars.RUST_TOOLCHAIN }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
target: ${{ matrix.target }}
components: clippy

- run: rustup default ${{ vars.RUST_TOOLCHAIN }}
- run: rustup default ${{ env.RUST_TOOLCHAIN }}

- name: Sccache cache
uses: mozilla-actions/[email protected]
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ concurrency:
# If this is enabled it will cancel current running and start latest
cancel-in-progress: true

env:
RUST_TOOLCHAIN: 1.73.0

jobs:
release-docker:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -101,7 +104,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: ${{ steps.cache.outputs.cache-from }}
cache-to: ${{ steps.cache.outputs.cache-to }}
build-args: RUST_TOOLCHAIN=${{ vars.RUST_TOOLCHAIN }}
build-args: RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}

- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
Expand Down

0 comments on commit 818be16

Please sign in to comment.