mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
Update main.yml
This commit is contained in:
parent
77839d17e1
commit
095f573864
1 changed files with 16 additions and 10 deletions
26
.github/workflows/main.yml
vendored
26
.github/workflows/main.yml
vendored
|
@ -3,12 +3,13 @@ on: [push]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REPO_URL: 'https://github.com/ysurac/openmptcprouter'
|
REPO_URL: 'https://github.com/ysurac/openmptcprouter'
|
||||||
OMR_TARGET: 'x86_64'
|
|
||||||
OMR_KERNEL: '5.4'
|
OMR_KERNEL: '5.4'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
OMR_TARGET: [bpi-r2, p2w_r619ac, rpi2, rpi4, wrt32x, espressobin, r2s, rpi3, wrt3200acm, x86, x86_64]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -40,23 +41,28 @@ jobs:
|
||||||
env:
|
env:
|
||||||
OMR_FEED_URL: https://github.com/ysurac/openmptcprouter-feeds
|
OMR_FEED_URL: https://github.com/ysurac/openmptcprouter-feeds
|
||||||
SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }}
|
SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }}
|
||||||
|
OMR_TARGET: ${{ matrix.OMR_TARGET }}
|
||||||
run: |
|
run: |
|
||||||
OMR_FEED_SRC="${SOURCE_NAME}" sh build.sh prepare {tools,toolchain}/install -j$(nproc)
|
OMR_FEED_SRC="${SOURCE_NAME}" sh build.sh prepare {tools,toolchain}/install -j$(nproc)
|
||||||
#echo -e "${{ secrets.OMR_PRIVKEY }}" > $OMR_TARGET/source/key-build
|
#echo -e "${{ secrets.OMR_PRIVKEY }}" > $OMR_TARGET/source/key-build
|
||||||
#echo -e "${{ secrets.OMR_PUBKEY }}" > $OMR_TARGET/source/key-build.pub
|
#echo -e "${{ secrets.OMR_PUBKEY }}" > $OMR_TARGET/source/key-build.pub
|
||||||
- name: Build packages
|
- name: Build packages
|
||||||
working-directory: ./openmptcprouter
|
working-directory: ./openmptcprouter
|
||||||
|
env:
|
||||||
|
OMR_TARGET: ${{ matrix.OMR_TARGET }}
|
||||||
run: |
|
run: |
|
||||||
make IGNORE_ERRORS=m -C $OMR_TARGET/source package/{compile,install,index} -j$(nproc)
|
make IGNORE_ERRORS=m -C $OMR_TARGET/source package/{compile,install,index} -j$(nproc)
|
||||||
- name: Build image
|
- name: Build image
|
||||||
working-directory: ./openmptcprouter
|
working-directory: ./openmptcprouter
|
||||||
|
env:
|
||||||
|
OMR_TARGET: ${{ matrix.OMR_TARGET }}
|
||||||
run: |
|
run: |
|
||||||
make IGNORE_ERRORS=m -C $OMR_TARGET/source target/install -j$(nproc)
|
make IGNORE_ERRORS=m -C $OMR_TARGET/source target/install -j$(nproc)
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ env.OMR_TARGET }}
|
name: ${{ matrix.OMR_TARGET }}
|
||||||
path: ./openmptcprouter/${{ env.OMR_TARGET }}/source/bin
|
path: ./openmptcprouter/${{ matrix.OMR_TARGET }}/source/bin
|
||||||
- if: steps.branch_name.outputs.SOURCE_BRANCH == ''
|
- if: steps.branch_name.outputs.SOURCE_BRANCH == ''
|
||||||
name: Deploy - Create directory
|
name: Deploy - Create directory
|
||||||
uses: fifsky/ssh-action@master
|
uses: fifsky/ssh-action@master
|
||||||
|
@ -66,7 +72,7 @@ jobs:
|
||||||
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
|
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
|
||||||
with:
|
with:
|
||||||
command: |
|
command: |
|
||||||
mkdir -p deploy/release/${{env.SOURCE_TAG}}/${{env.OMR_TARGET}}
|
mkdir -p deploy/release/${{env.SOURCE_TAG}}/${{matrix.OMR_TARGET}}
|
||||||
host: ${{ secrets.OMR_DEPLOY_HOST }}
|
host: ${{ secrets.OMR_DEPLOY_HOST }}
|
||||||
user: deploy
|
user: deploy
|
||||||
port: ${{ secrets.OMR_DEPLOY_PORT }}
|
port: ${{ secrets.OMR_DEPLOY_PORT }}
|
||||||
|
@ -80,7 +86,7 @@ jobs:
|
||||||
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
|
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
|
||||||
with:
|
with:
|
||||||
command: |
|
command: |
|
||||||
mkdir -p deploy/${{env.SOURCE_BRANCH}}/${{env.OMR_KERNEL}}/${{env.OMR_TARGET}}
|
mkdir -p deploy/${{env.SOURCE_BRANCH}}/${{env.OMR_KERNEL}}/${{matrix.OMR_TARGET}}
|
||||||
host: ${{ secrets.OMR_DEPLOY_HOST }}
|
host: ${{ secrets.OMR_DEPLOY_HOST }}
|
||||||
user: deploy
|
user: deploy
|
||||||
port: ${{ secrets.OMR_DEPLOY_PORT }}
|
port: ${{ secrets.OMR_DEPLOY_PORT }}
|
||||||
|
@ -90,8 +96,8 @@ jobs:
|
||||||
uses: burnett01/rsync-deployments@4.1
|
uses: burnett01/rsync-deployments@4.1
|
||||||
with:
|
with:
|
||||||
switches: -av --delete-after
|
switches: -av --delete-after
|
||||||
remote_path: deploy/release/${{env.SOURCE_TAG}}/${{env.OMR_TARGET}}
|
remote_path: deploy/release/${{env.SOURCE_TAG}}/${{matrix.OMR_TARGET}}
|
||||||
path: ./openmptcprouter/${{env.OMR_TARGET}}/source/bin/
|
path: ./openmptcprouter/${{matrix.OMR_TARGET}}/source/bin/
|
||||||
remote_key: ${{ secrets.PRIVATE_KEY }}
|
remote_key: ${{ secrets.PRIVATE_KEY }}
|
||||||
remote_user: deploy
|
remote_user: deploy
|
||||||
remote_host: ${{ secrets.OMR_DEPLOY_HOST }}
|
remote_host: ${{ secrets.OMR_DEPLOY_HOST }}
|
||||||
|
@ -105,8 +111,8 @@ jobs:
|
||||||
uses: burnett01/rsync-deployments@4.1
|
uses: burnett01/rsync-deployments@4.1
|
||||||
with:
|
with:
|
||||||
switches: -av --delete-after
|
switches: -av --delete-after
|
||||||
remote_path: deploy/${{env.SOURCE_BRANCH}}/${{env.OMR_KERNEL}}/${{env.OMR_TARGET}}
|
remote_path: deploy/${{env.SOURCE_BRANCH}}/${{env.OMR_KERNEL}}/${{matrix.OMR_TARGET}}
|
||||||
path: ./openmptcprouter/${{env.OMR_TARGET}}/source/bin/
|
path: ./openmptcprouter/${{matrix.OMR_TARGET}}/source/bin/
|
||||||
remote_key: ${{ secrets.PRIVATE_KEY }}
|
remote_key: ${{ secrets.PRIVATE_KEY }}
|
||||||
remote_user: deploy
|
remote_user: deploy
|
||||||
remote_host: ${{ secrets.OMR_DEPLOY_HOST }}
|
remote_host: ${{ secrets.OMR_DEPLOY_HOST }}
|
||||||
|
|
Loading…
Reference in a new issue