forked from openwrt/firmware-selector-openwrt-org
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (38 loc) · 1.46 KB
/
static-stable.yml
File metadata and controls
46 lines (38 loc) · 1.46 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
43
44
45
46
name: Deploy static content to OpenWrt Download Server
on:
push:
branches: ["stable"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages-stable"
cancel-in-progress: false
jobs:
# Single deploy job since we're just deploying
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install rsync
run: |
sudo apt-get update
sudo apt-get install -y rsync
- name: Setup config.json
run: |
cd www/
sed -i "s;%GIT_VERSION%;$(git describe --tags);" js/main.js
sed -i 's;image_url: "../misc",;image_url: "https://downloads.openwrt.org",;' config.js
sed -i "s; //show_snapshots; show_snapshots;" config.js
sed -i "s; versions; // versions;" config.js
- name: Upload using rsync
run: |
echo ${{ secrets.RSYNC_PASSWORD }} > ~/.rsync_password
chmod 600 ~/.rsync_password
rsync -av --password-file=~/.rsync_pass www/ ${{ secrets.RSYNC_USER }}@mirror-03.infra.openwrt.org::firmware_selector/