2023-02-27 10:45:14 +00:00
|
|
|
name: "Update webring"
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
# Every Sunday.
|
|
|
|
- cron: '0 0 * * 0'
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: cachix/install-nix-action@v17
|
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixpkgs-unstable
|
2023-03-26 08:32:16 +00:00
|
|
|
- name: Build webring
|
2023-04-25 10:59:34 +00:00
|
|
|
run: nix develop -c rake build_openring
|
2023-03-26 08:32:16 +00:00
|
|
|
- name: Commit the changes
|
|
|
|
run: |
|
|
|
|
# Show the commit as set by the Actions bot.
|
|
|
|
# https://github.com/actions/checkout/discussions/479
|
|
|
|
git config user.name 'github-actions[bot]'
|
|
|
|
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
2023-03-05 12:40:48 +00:00
|
|
|
|
2023-03-26 08:32:16 +00:00
|
|
|
# Commit the update.
|
|
|
|
git add ./layouts/partials/openring.html
|
|
|
|
git commit --message "Update webring as of $(date +%F)"
|
2023-03-05 12:40:48 +00:00
|
|
|
|
2023-03-26 08:32:16 +00:00
|
|
|
# Push it into the current branch.
|
|
|
|
git remote remove origin
|
|
|
|
git remote add origin https://${{ secrets.GITHUB_TOKEN }}@github.com/foo-dogsquared/website.git
|
|
|
|
git push --set-upstream origin master
|