-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.03 KB
/
update-jcode.yml
File metadata and controls
42 lines (33 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Update jcode
on:
schedule:
- cron: "0 6 * * *"
workflow_dispatch: {}
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Check for updates
id: update
run: |
nix shell nixpkgs#curl nixpkgs#jq nixpkgs#git \
-c bash scripts/update-jcode.sh
- name: Build updated package
if: steps.update.outputs.UPDATED == 'true'
run: nix build
- name: Commit and push to main
if: steps.update.outputs.UPDATED == 'true'
run: |
VERSION="${{ steps.update.outputs.VERSION }}"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add default.nix
git commit -m "chore: update jcode to ${VERSION}"
git push origin main