diff --git a/.forgejo/workflows/daily-collect.yaml b/.forgejo/workflows/daily-collect.yaml index 890bd2d..8d5fc49 100644 --- a/.forgejo/workflows/daily-collect.yaml +++ b/.forgejo/workflows/daily-collect.yaml @@ -1,20 +1,15 @@ name: Daily Feed Update - on: schedule: - # Run daily at 1:00 AM UTC (adjust the time as needed) - cron: '0 1 * * *' workflow_dispatch: - # Allow manual triggering of the workflow jobs: update-feed: runs-on: ubuntu-latest - steps: - - - name: Install Dependencies - run: | + - name: Install Dependencies + run: | apk update apk add --no-cache \ openssh-client \ @@ -27,7 +22,7 @@ jobs: SSH_PRIVATE_KEY: ${{ secrets.TOKEN_NAME }} run: | mkdir -p ~/.ssh - echo "$TOKEN_NAME" | tr -d '\r' > ~/.ssh/id_rsa + echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa ssh-keyscan git.mcdevitt.tech >> ~/.ssh/known_hosts ssh-keygen -F git.mcdevitt.tech || true @@ -50,10 +45,12 @@ jobs: mkdir -p ~/.cargo/registry mkdir -p ~/.cargo/git mkdir -p target - + - name: Run recent feed update - run: cargo run -- --feed recent - + run: | + source "$HOME/.cargo/env" + cargo run -- --feed recent + - name: Commit and push results run: | git config user.name bpmcdevitt