45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: handy update
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "10 3 * * *" # UTC
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-handy:
|
|
runs-on: ubuntu-latest
|
|
concurrency:
|
|
group: handy-update
|
|
cancel-in-progress: false
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: install nix
|
|
uses: cachix/install-nix-action@v27
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
- name: check latest handy release and update file
|
|
id: update
|
|
env:
|
|
FILE: modules/pkgs/handy.nix
|
|
LATEST_RELEASE_URL: https://github.com/cjpais/Handy/releases/latest
|
|
DOWNLOAD_URL_TEMPLATE: https://github.com/cjpais/Handy/releases/download/v{version}/Handy_{version}_amd64.AppImage
|
|
RELEASE_TAG_TEMPLATE: v{version}
|
|
shell: bash
|
|
run: bash .gitea/scripts/update-appimage-nix.sh
|
|
|
|
- name: commit and push to main
|
|
if: steps.update.outputs.updated == 'true'
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
version="${{ steps.update.outputs.version }}"
|
|
|
|
FILE="modules/pkgs/handy.nix" \
|
|
COMMIT_MESSAGE="update handy to ${version}" \
|
|
bash .gitea/scripts/commit-update-main.sh
|