From c69ca6857303860895e7b3650640b3ab9740af81 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 18 Oct 2020 01:05:16 +0900 Subject: [PATCH 1/3] Set mdbook version as env var --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3d3004a..ee188b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,9 +15,11 @@ jobs: rustup toolchain install nightly -c rust-docs rustup default nightly - name: Install mdbook + env: + MDBOOK_VER: v0.4.3 run: | mkdir bin - curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.3.5/mdbook-v0.3.5-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin + curl -sSL https://github.com/rust-lang/mdBook/releases/download/${{ env.MDBOOK_VER }}/mdbook-${{ env.MDBOOK_VER }}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin echo "##[add-path]$(pwd)/bin" - name: Report versions run: | From 5af1ba0fd20dc9645638c83b2ea726e7f2537a84 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 18 Oct 2020 01:07:58 +0900 Subject: [PATCH 2/3] Replace deprecated `add-path` with safe way --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ee188b2..3fd8518 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: run: | mkdir bin curl -sSL https://github.com/rust-lang/mdBook/releases/download/${{ env.MDBOOK_VER }}/mdbook-${{ env.MDBOOK_VER }}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin - echo "##[add-path]$(pwd)/bin" + echo "$(pwd)/bin" >> $GITHUB_PATH - name: Report versions run: | rustup --version From e574ee0e4ab38b0f1a0148e6560fc978bd4d6c55 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 18 Oct 2020 01:09:09 +0900 Subject: [PATCH 3/3] Use `actions/checkout@v2` Note that the repository's default branch is now `main`, not `master`. And this should be safer to avoid breaking change. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3fd8518..cf0fafe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ jobs: name: Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: Update rustup run: rustup self update - name: Install Rust