mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-27 06:50:21 +00:00
CI: Support slashed branches (#767)
* CI: Support slashed branches * CI: Create rsync destination directory
This commit is contained in:
parent
98830a8a41
commit
f35977e84f
1 changed files with 5 additions and 5 deletions
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
|
@ -57,13 +57,13 @@ jobs:
|
||||||
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
|
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
|
||||||
REF=${{ github.head_ref }}
|
REF=${{ github.head_ref }}
|
||||||
fi
|
fi
|
||||||
BRANCH_OR_TAG=${REF##*/}
|
BRANCH_OR_TAG=${REF#refs/*/}
|
||||||
SHA=$(git rev-parse --short HEAD)
|
SHA=$(git rev-parse --short HEAD)
|
||||||
|
|
||||||
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
|
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
|
||||||
SUFFIX=${BRANCH_OR_TAG}
|
SUFFIX=${BRANCH_OR_TAG//\//_}
|
||||||
else
|
else
|
||||||
SUFFIX=${BRANCH_OR_TAG}-$(date +'%d%m%Y')-${SHA}
|
SUFFIX=${BRANCH_OR_TAG//\//_}-$(date +'%d%m%Y')-${SHA}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "WORKFLOW_BRANCH_OR_TAG=${BRANCH_OR_TAG}" >> $GITHUB_ENV
|
echo "WORKFLOW_BRANCH_OR_TAG=${BRANCH_OR_TAG}" >> $GITHUB_ENV
|
||||||
|
@ -186,9 +186,9 @@ jobs:
|
||||||
|
|
||||||
- name: 'Upload artifacts to update server'
|
- name: 'Upload artifacts to update server'
|
||||||
if: ${{ !github.event.pull_request.head.repo.fork }}
|
if: ${{ !github.event.pull_request.head.repo.fork }}
|
||||||
uses: burnett01/rsync-deployments@4.1
|
uses: burnett01/rsync-deployments@5.1
|
||||||
with:
|
with:
|
||||||
switches: -avzP --delete
|
switches: -avzP --delete --mkpath
|
||||||
path: artifacts/
|
path: artifacts/
|
||||||
remote_path: "${{ secrets.RSYNC_DEPLOY_BASE_PATH }}${{steps.names.outputs.artifacts-path}}/"
|
remote_path: "${{ secrets.RSYNC_DEPLOY_BASE_PATH }}${{steps.names.outputs.artifacts-path}}/"
|
||||||
remote_host: ${{ secrets.RSYNC_DEPLOY_HOST }}
|
remote_host: ${{ secrets.RSYNC_DEPLOY_HOST }}
|
||||||
|
|
Loading…
Reference in a new issue