taskwarrior/.github/workflows/backup.yml
dependabot[bot] f41a16a0a5
Some checks failed
checks / Check & Clippy (push) Has been cancelled
checks / Formatting (push) Has been cancelled
checks / Cargo Metadata (push) Has been cancelled
release-tests / check-tarball (push) Has been cancelled
tests / coverage (push) Has been cancelled
tests / Cargo Test (push) Has been cancelled
tests / tests (Mac OS 12.latest) (push) Has been cancelled
tests / tests (Mac OS 13.latest) (push) Has been cancelled
tests / tests (arch, Archlinux Base (Rolling), ubuntu-latest) (push) Has been cancelled
tests / tests (debiantesting, Debian Testing, ubuntu-latest) (push) Has been cancelled
tests / tests (fedora40, Fedora 40, ubuntu-latest) (push) Has been cancelled
tests / tests (fedora41, Fedora 41, ubuntu-latest) (push) Has been cancelled
tests / tests (opensuse, OpenSUSE Tumbleweed (Rolling), ubuntu-latest) (push) Has been cancelled
tests / tests (ubuntu2004, Ubuntu 20.04, ubuntu-latest) (push) Has been cancelled
tests / tests (ubuntu2204, Ubuntu 22.04, ubuntu-latest) (push) Has been cancelled
Bump actions/checkout from 4 to 5 (#3936)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-28 09:54:36 -04:00

58 lines
1.5 KiB
YAML

name: backup
on:
schedule:
# Mondays are backup days
- cron: '0 0 * * 1'
jobs:
# This job runs `backup-github-repo` which captures all issues and pull requests,
# including their comments. Note that this does not capture discussions or releases.
repo-issues:
runs-on: ubuntu-latest
name: "Backup Repo Issues"
permissions:
contents: write
actions: read
attestations: read
checks: read
deployments: read
issues: read
models: read
discussions: read
packages: read
pages: read
pull-requests: read
security-events: read
statuses: read
steps:
- uses: actions/checkout@v5
- name: "Install backup-github-repo"
run: npm install -g backup-github-repo
- name: "Configure backup-github-repo"
run: |
echo "{\"token\":\"${GH_TOKEN}\"}" > .backup-github-repo
echo .backup-github-repo >> .git/info/exclude
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Run backup-github-repo"
run: backup-github-repo
- name: "Remove unnecessary HTML"
run: rm -rf repo-backup/html
- name: "Push the results"
run: |
git config --global user.name 'Backup Job'
git config --global user.email 'taskwarrior@noreply.github.com'
git add repo-backup
if [[ -n "$(git status --porcelain)" ]]; then
git commit -am "Update Repo Backup"
git push
else
echo "No changes; not making a commit"
fi