mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
Download artifacts from workflow run trigger
This commit is contained in:
56
.github/workflows/build-desktop.yml
vendored
56
.github/workflows/build-desktop.yml
vendored
@@ -619,8 +619,32 @@ jobs:
|
||||
if: steps.build-cache.outputs.cache-hit != 'true'
|
||||
run: npm run build
|
||||
|
||||
- name: Download artifact from workflow_run event
|
||||
if: ${{ github.event_name == 'workflow_run' }}
|
||||
uses: dawidd6/action-download-artifact@b2abf1705491048a2d7074f7d90513044fd25d39 # v2.19.0
|
||||
with:
|
||||
workflow: build-browser.yml
|
||||
workflow_conclusion: success
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
path: ${{ github.workspace }}/browser-build-artifacts
|
||||
|
||||
- name: Extract branch name
|
||||
if: ${{ contains(github.ref, "hotfix-rc") && github.event_name != 'workflow_run' }}
|
||||
id: extract_branch
|
||||
shell: bash
|
||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||
|
||||
- name: Download artifact from hotfix-rc
|
||||
if: ${{ contains(github.ref, "hotfix-rc") && github.event_name != 'workflow_run' }}
|
||||
uses: dawidd6/action-download-artifact@b2abf1705491048a2d7074f7d90513044fd25d39 # v2.19.0
|
||||
with:
|
||||
workflow: build-browser.yml
|
||||
workflow_conclusion: success
|
||||
branch: ${{ steps.extract_branch.outputs.branch }}
|
||||
path: ${{ github.workspace }}/browser-build-artifacts
|
||||
|
||||
- name: Download artifact from rc
|
||||
if: github.ref == 'refs/heads/rc'
|
||||
if: ${{ github.ref == 'refs/heads/rc' && github.event_name != 'workflow_run' }}
|
||||
uses: dawidd6/action-download-artifact@b2abf1705491048a2d7074f7d90513044fd25d39 # v2.19.0
|
||||
with:
|
||||
workflow: build-browser.yml
|
||||
@@ -629,7 +653,7 @@ jobs:
|
||||
path: ${{ github.workspace }}/browser-build-artifacts
|
||||
|
||||
- name: Download artifact from master
|
||||
if: github.ref != 'refs/heads/rc'
|
||||
if: ${{ github.ref != 'refs/heads/rc' && !contains(github.ref, "hotfix-rc") && github.event_name != 'workflow_run' }}
|
||||
uses: dawidd6/action-download-artifact@b2abf1705491048a2d7074f7d90513044fd25d39 # v2.19.0
|
||||
with:
|
||||
workflow: build-browser.yml
|
||||
@@ -809,8 +833,32 @@ jobs:
|
||||
if: steps.build-cache.outputs.cache-hit != 'true'
|
||||
run: npm run build
|
||||
|
||||
- name: Download artifact from workflow_run event
|
||||
if: ${{ github.event_name == 'workflow_run' }}
|
||||
uses: dawidd6/action-download-artifact@b2abf1705491048a2d7074f7d90513044fd25d39 # v2.19.0
|
||||
with:
|
||||
workflow: build-browser.yml
|
||||
workflow_conclusion: success
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
path: ${{ github.workspace }}/browser-build-artifacts
|
||||
|
||||
- name: Extract branch name
|
||||
if: ${{ contains(github.ref, "hotfix-rc") && github.event_name != 'workflow_run' }}
|
||||
id: extract_branch
|
||||
shell: bash
|
||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||
|
||||
- name: Download artifact from hotfix-rc
|
||||
if: ${{ contains(github.ref, "hotfix-rc") && github.event_name != 'workflow_run' }}
|
||||
uses: dawidd6/action-download-artifact@b2abf1705491048a2d7074f7d90513044fd25d39 # v2.19.0
|
||||
with:
|
||||
workflow: build-browser.yml
|
||||
workflow_conclusion: success
|
||||
branch: ${{ steps.extract_branch.outputs.branch }}
|
||||
path: ${{ github.workspace }}/browser-build-artifacts
|
||||
|
||||
- name: Download artifact from rc
|
||||
if: github.ref == 'refs/heads/rc'
|
||||
if: ${{ github.ref == 'refs/heads/rc' && github.event_name != 'workflow_run' }}
|
||||
uses: dawidd6/action-download-artifact@b2abf1705491048a2d7074f7d90513044fd25d39 # v2.19.0
|
||||
with:
|
||||
workflow: build-browser.yml
|
||||
@@ -819,7 +867,7 @@ jobs:
|
||||
path: ${{ github.workspace }}/browser-build-artifacts
|
||||
|
||||
- name: Download artifact from master
|
||||
if: github.ref != 'refs/heads/rc'
|
||||
if: ${{ github.ref != 'refs/heads/rc' && !contains(github.ref, "hotfix-rc") && github.event_name != 'workflow_run' }}
|
||||
uses: dawidd6/action-download-artifact@b2abf1705491048a2d7074f7d90513044fd25d39 # v2.19.0
|
||||
with:
|
||||
workflow: build-browser.yml
|
||||
|
||||
Reference in New Issue
Block a user