-
Notifications
You must be signed in to change notification settings - Fork 44
72 lines (72 loc) · 2.16 KB
/
deploy.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: "Deploy"
on:
schedule:
- cron: '0 20 * * *'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: nixbuild/nix-quick-install-action@v21
with:
nix_conf: experimental-features = nix-command flakes
- name: update flake inputs
run: |
nix flake update
git add flake.lock
- name: update android sources
run: ./scripts/update.sh
- name: test
run: |
nix flake check --show-trace
nix flake check ./nix-android-repo --show-trace
- name: push
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
./scripts/deploy.sh
channel:
runs-on: ubuntu-latest
needs: update
steps:
- uses: actions/checkout@v2
- uses: nixbuild/nix-quick-install-action@v21
with:
nix_conf: experimental-features = nix-command flakes
- name: build nixexprs
run: ./scripts/channel.sh
- name: deploy nix channel
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: build
CLEAN: true
SINGLE_COMMIT: true
GIT_CONFIG_NAME: "github-actions"
GIT_CONFIG_EMAIL: "[email protected]"
sync:
runs-on: ubuntu-latest
needs: update
strategy:
matrix:
channel: [stable, beta, preview, canary]
steps:
- name: main -> ${{ matrix.channel }}
uses: devmasx/[email protected]
with:
type: now
from_branch: main
target_branch: ${{ matrix.channel }}
github_token: ${{ github.token }}
- uses: actions/checkout@v2
with:
ref: ${{ matrix.channel }}
- name: tag ${{ matrix.channel }}
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
tag="$(date --utc --iso-8601)-${{ matrix.channel }}"
git tag --annotate --message "Version $tag" "$tag"
git push origin "$tag"