Skip to content

Fix/minors

Fix/minors #240

Workflow file for this run

name: Merge Pull Request
on:
pull_request:
types: [closed]
env:
storage-url: ${{secrets.CI_STORAGE_URL}}
storage-user: ${{secrets.CI_STORAGE_USER}}
storage-token: ${{secrets.CI_STORAGE_TOKEN}}
jobs:
remove-dist:
if: ${{ always() }}
runs-on: [self-hosted]
steps:
- name: Remove PR storage directory
shell: bash
run: |
PR_URL="${{env.storage-url}}/${{github.head_ref}}"
AUTH=''
if [[ ! -z '${{env.storage-user}}' ]]; then
AUTH='-u ${{env.storage-user}}:${{env.storage-token}} '
fi
curl -L -X DELETE $AUTH "${PR_URL}/"
update-results:
if: github.event.pull_request.merged == true
runs-on: [self-hosted]
steps:
- name: Update base branch performance results
shell: bash
run: |
PR_URL="${{env.storage-url}}/results/${{github.head_ref}}"
BASE_URL="${{env.storage-url}}/results/${{github.base_ref}}"
AUTH=''
if [[ ! -z '${{env.storage-user}}' ]]; then
AUTH='-u ${{env.storage-user}}:${{env.storage-token}} '
fi
curl -L -X MOVE $AUTH --header "Destination:${BASE_URL}/" "${PR_URL}/"
curl -L -X DELETE $AUTH "${PR_URL}/"