https://linen.dev logo
Github Action incompatible with caching
# help
a
I'm trying to deploy my serenity project using Github Action, however when I combine shuttle-hq/deploy-action@main with actions/cache@v3, I get the following error:
Copy code
# using cargo-quickinstall because it is faster to get shuttle-cli binary
  cargo install cargo-quickinstall
  cargo quickinstall cargo-shuttle
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
    Updating crates.io index
error: binary `cargo-quickinstall` already exists in destination
Add --force to overwrite
Error: Process completed with exit code 101.
My full action is here:
Copy code
name: Shuttle deploy

on:
  push:
    branches:
      - "main"
  workflow_dispatch:

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Create Secrets.toml File
        run: echo "DISCORD_TOKEN = '${{ secrets.DISCORD_API_TOKEN }}'" > Secrets.toml

      - name: Update cache
        uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

      - name: Deploy to shuttle
        uses: shuttle-hq/deploy-action@main
        with:
          deploy-key: ${{ secrets.SHUTTLE_DEPLOY_KEY }}
          allow-dirty: "true"
s
This seems to be a bug. So I created an issue https://github.com/shuttle-hq/deploy-action/issues/5
a
Thanks, is there any estimate of when this or the .gitignore Cargo.toml issue might be fixed?
s
This one might be a bit longer. The .gitignore one for the secrets are done. We just have to release https://github.com/shuttle-hq/shuttle/pull/422