45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
name: t3code update
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "30 3 * * *" # UTC
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-t3code:
|
|
runs-on: ubuntu-latest
|
|
concurrency:
|
|
group: t3code-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 t3code release and update file
|
|
id: update
|
|
env:
|
|
FILE: modules/pkgs/t3code.nix
|
|
LATEST_RELEASE_URL: https://github.com/pingdotgg/t3code/releases/latest
|
|
DOWNLOAD_URL_TEMPLATE: https://github.com/pingdotgg/t3code/releases/download/v{version}/T3-Code-{version}-x86_64.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/t3code.nix" \
|
|
COMMIT_MESSAGE="update t3code to ${version}" \
|
|
bash .gitea/scripts/commit-update-main.sh
|