feat: added script to automatically update with github actions
Co-authored-by: omarcresp <crespomerchano@gmail.com>
This commit is contained in:
41
.github/workflows/zen-update.yml
vendored
Normal file
41
.github/workflows/zen-update.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Update Zen Browser
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 * * * *"
|
||||
|
||||
jobs:
|
||||
update-zen-browser:
|
||||
name: Update Zen Browser
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check new version
|
||||
id: new-version
|
||||
run: |
|
||||
.github/new-version.sh
|
||||
|
||||
- name: Install Nix
|
||||
if: steps.new-version.outputs.new_version == 'true'
|
||||
uses: cachix/install-nix-action@v27
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixpkgs-unstable
|
||||
|
||||
- name: Setup Nix Magic Cache
|
||||
if: steps.new-version.outputs.new_version == 'true'
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
||||
- name: Update hashes and test build
|
||||
if: steps.new-version.outputs.new_version == 'true'
|
||||
run: |
|
||||
.github/update-zen-browser.bash
|
||||
|
||||
- name: Commit changes
|
||||
if: steps.new-version.outputs.new_version == 'true'
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "GitHub Action automated Zen update"
|
||||
file_pattern: "*"
|
||||
Reference in New Issue
Block a user