Updated file names
This commit is contained in:
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
@ -50,7 +50,9 @@ jobs:
|
||||
|
||||
- name: Set outputs
|
||||
id: vars
|
||||
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||
run: |
|
||||
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||
|
||||
- name: Upload Build Artifact
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
@ -66,8 +68,8 @@ jobs:
|
||||
- name: Prepare to upload
|
||||
run: |
|
||||
mkdir ${{ 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 }}/${{ steps.vars.outputs.sha_short }}.elf
|
||||
cp build_${{ matrix.node }}/bobbyquad_${{ matrix.node }}.bin ${{ steps.vars.outputs.sha_short }}/${{ steps.vars.outputs.sha_short }}.${{ steps.vars.outputs.branch }}.bin
|
||||
cp build_${{ matrix.node }}/bobbyquad_${{ matrix.node }}.elf ${{ steps.vars.outputs.sha_short }}/${{ steps.vars.outputs.sha_short }}.${{ steps.vars.outputs.branch }}.elf
|
||||
echo ${{ steps.vars.outputs.sha_short }}
|
||||
echo Prepare for upload from ${{ steps.vars.outputs.sha_short }}/ to /home/github/builds/${{ matrix.node }}
|
||||
|
||||
@ -77,11 +79,10 @@ jobs:
|
||||
env:
|
||||
HOST: commanderred.xyz
|
||||
KEY: ${{ secrets.RSYNC_SSH_KEY }}
|
||||
TARGET: /home/github/builds/
|
||||
TARGET: /home/github/tmp/
|
||||
USER: github
|
||||
SSH_ARGS: '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
|
||||
SOURCE: '${{ steps.vars.outputs.sha_short }}'
|
||||
PRE_SCRIPT: "echo Uploading from ${{ steps.vars.outputs.sha_short }}/ to /home/github/builds/${{ matrix.node }}"
|
||||
POST_SCRIPT: "echo Upload done"
|
||||
|
||||
- name: Create Symlink on server
|
||||
@ -92,6 +93,6 @@ jobs:
|
||||
key: ${{ secrets.RSYNC_SSH_KEY }}
|
||||
port: 22
|
||||
script: |
|
||||
mv /home/github/builds/${{ steps.vars.outputs.sha_short }} /home/github/builds/${{ matrix.node }}
|
||||
mv /home/github/tmp/${{ steps.vars.outputs.sha_short }} /home/github/builds/${{ matrix.node }}
|
||||
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