-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 1.56 KB
/
pipeline.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
name: OpenWrt Firmware For r5s
on:
push:
branches:
- main
paths:
- ".github/workflows/pipeline.yml"
- "files/*"
- "patches/*"
- "action.sh"
- "config"
- "feeds.conf.default"
schedule:
- cron: '00 18 * * 5'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@master
- name: Clean workspace
run: |
./action.sh cleanup
- name: Init system
run: |
./action.sh init
- name: Build firmware
run: |
./action.sh build
- name: Artifact firmware
run: |
./action.sh artifact
- name: Set Release Name
id: artifact
run: |
release_tag="$(date +%Y-%m-%d)"
echo "release_tag=$release_tag" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
tag_name: ${{ steps.artifact.outputs.release_tag }}
release_name: ${{ steps.artifact.outputs.release_tag }}
draft: false
prerelease: false
- name: Upload Release Asset(openwrt-r5s-squashfs-img)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./openwrt-r5s-squashfs-img.zip
asset_name: openwrt-r5s-squashfs-img.zip
asset_content_type: application/zip