Adjust conan dependencies workflow to use pull_request_target #116
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Rebuild default Conan cache" | |
on: | |
pull_request_target: | |
types: | |
- closed | |
branches: | |
- develop | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
load-linux-conan-cache: | |
name: "Refresh Conan cache on Linux" | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.merged == true | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Prepare Conan cache | |
id: cache-conan | |
uses: actions/cache@v4 | |
with: | |
path: ~/.conan | |
key: conan-packages-${{ runner.os }}-hash-${{ hashFiles('conanfile.py') }} | |
- name: Install GTK2 | |
if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }} | |
run: sudo apt-get update && sudo apt-get install gtk2.0 libgtk2.0-dev -y | |
- name: Install pip dependencies | |
if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }} | |
run: pip install -r requirements.txt | |
- name: Build Conan dependencies | |
if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }} | |
run: | | |
conan install . \ | |
--build=missing \ | |
-s build_type=Release \ | |
-if dist3/conan \ | |
-o opNav=True \ | |
-o vizInterface=True \ | |
-o generator="Ninja" \ | |
--update |