Create symlink
This commit is contained in:
20
.github/workflows/main.yml
vendored
20
.github/workflows/main.yml
vendored
@ -66,11 +66,8 @@ jobs:
|
|||||||
- name: Prepare to upload
|
- name: Prepare to upload
|
||||||
run: |
|
run: |
|
||||||
mkdir ${{ steps.vars.outputs.sha_short }}
|
mkdir ${{ steps.vars.outputs.sha_short }}
|
||||||
cp build_${{ matrix.node }}/bobbyquad_${{ matrix.node }}.bin ${{ steps.vars.outputs.sha_short }}/
|
cp build_${{ matrix.node }}/bobbyquad_${{ matrix.node }}.bin ${{ steps.vars.outputs.sha_short }}/${{ steps.vars.outputs.sha_short }}.bin
|
||||||
cp build_${{ matrix.node }}/bobbyquad_${{ matrix.node }}.elf ${{ steps.vars.outputs.sha_short }}/
|
cp build_${{ matrix.node }}/bobbyquad_${{ matrix.node }}.elf ${{ steps.vars.outputs.sha_short }}/${{ steps.vars.outputs.sha_short }}.elf
|
||||||
cp build_${{ matrix.node }}/bootloader/bootloader.bin ${{ steps.vars.outputs.sha_short }}/
|
|
||||||
cp build_${{ matrix.node }}/bootloader/bootloader.elf ${{ steps.vars.outputs.sha_short }}/
|
|
||||||
cp build_${{ matrix.node }}/partition_table/partition-table.bin ${{ steps.vars.outputs.sha_short }}/
|
|
||||||
echo ${{ steps.vars.outputs.sha_short }}
|
echo ${{ steps.vars.outputs.sha_short }}
|
||||||
echo Prepare for upload from ${{ steps.vars.outputs.sha_short }}/ to /home/github/builds/${{ matrix.node }}
|
echo Prepare for upload from ${{ steps.vars.outputs.sha_short }}/ to /home/github/builds/${{ matrix.node }}
|
||||||
|
|
||||||
@ -80,9 +77,20 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
HOST: commanderred.xyz
|
HOST: commanderred.xyz
|
||||||
KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||||
TARGET: /home/github/builds/${{ matrix.node }}
|
TARGET: /home/github/builds/
|
||||||
USER: github
|
USER: github
|
||||||
SSH_ARGS: '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
|
SSH_ARGS: '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
|
||||||
SOURCE: '${{ steps.vars.outputs.sha_short }}'
|
SOURCE: '${{ steps.vars.outputs.sha_short }}'
|
||||||
PRE_SCRIPT: "echo Uploading from ${{ steps.vars.outputs.sha_short }}/ to /home/github/builds/${{ matrix.node }}"
|
PRE_SCRIPT: "echo Uploading from ${{ steps.vars.outputs.sha_short }}/ to /home/github/builds/${{ matrix.node }}"
|
||||||
POST_SCRIPT: "echo Upload done"
|
POST_SCRIPT: "echo Upload done"
|
||||||
|
|
||||||
|
- name: Create Symlink on server
|
||||||
|
uses: appleboy/ssh-action@master
|
||||||
|
with:
|
||||||
|
host: commanderred.xyz
|
||||||
|
username: github
|
||||||
|
key: ${{ secrets.RSYNC_SSH_KEY }}
|
||||||
|
port: 22
|
||||||
|
script: |
|
||||||
|
rm -f /home/github/builds/${{ matrix.node }}/latest.bin
|
||||||
|
ln -s /home/github/builds/${{ matrix.node }}/${{ steps.vars.outputs.sha_short }}.bin /home/github/builds/${{ matrix.node }}/latest.bin
|
||||||
|
Reference in New Issue
Block a user