Skip to content

Scheduled workflows are disabled automatically after 60 days of repository inactivity. #1

Description

@everruler12

image

This could be solved by pushing a log file in this repo, such as:

name: "Roam Research backup"

on:
  push:
    branches:
      - main
  schedule:
      - cron: "0 15-23,0-7 * * *" # from 8am-midnight MST

jobs:
  backup:
    runs-on: ubuntu-latest
    name: Backup
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v2
        with:
          repository: ${{ secrets.BACKUP_REPO }}
          token: ${{ secrets.ACCESS_TOKEN }}
      
      - name: Setup Node
        uses: actions/setup-node@v2
        with:
          node-version: '14'
      
      - name: Run Backup
        run: |
          cd /tmp
          git clone -q https://github.com/everruler12/roam2github.git roam2github
          cd $_
          npm i
          npm run backup -s
        env:
          ROAM_EMAIL: ${{ secrets.ROAM_EMAIL }}
          ROAM_PASSWORD: ${{ secrets.ROAM_PASSWORD }}
          ROAM_GRAPH: ${{ secrets.ROAM_GRAPH }}
          BACKUP_EDN: true
          BACKUP_JSON: true
          BACKUP_MARKDOWN: true

      - name: Commit Changes
        uses: everruler12/git-auto-commit-action@latest
        with:
          commit_message: Automatic backup

      # use the below to prevent 60 day thing
      - uses: actions/checkout@v2
      
      - name: Log run time
        run: |
          cd to working dir
          touch DATETIME > last-run.md
        
      - name: Commit Changes
        uses: everruler12/git-auto-commit-action@latest
        with: Log last run
          commit_message: Log last ran

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions