Skip to content

Commit

Permalink
Merge workflow fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ansaya committed May 18, 2022
1 parent ec3c29e commit 38db917
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,28 @@ env:
jobs:
remove-dist:
runs-on: [self-hosted]
env:
pr_url: ${{env.storage-url}}/${{github.head_ref}}
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 "${{env.pr_url}}/"
curl -L -X DELETE $AUTH "${PR_URL}/"
update-results:
if: github.event.pull_request.merged == true
runs-on: [self-hosted]
env:
pr_url: ${{env.storage-url}}/results/${{github.head_ref}}
base_url: ${{env.storage-url}}/results/${{github.base_ref}}
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:${{env.base_url}}/" "${{env.pr_url}}/"
curl -L -X DELETE $AUTH "${{env.pr_url}}/"
curl -L -X MOVE $AUTH --header "Destination:${BASE_URL}/" "${PR_URL}/"
curl -L -X DELETE $AUTH "${PR_URL}/"

0 comments on commit 38db917

Please sign in to comment.