From 6f60423c602cd877c334df8eda9c4a18dc575d18 Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Wed, 14 Sep 2022 19:23:19 +0200 Subject: [PATCH] Unified gh actions for pull and push --- .github/workflows/pull_request.yml | 37 ------------------------------ .github/workflows/push.yml | 5 ++-- 2 files changed, 3 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/pull_request.yml diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml deleted file mode 100644 index 3edcddd7c..000000000 --- a/.github/workflows/pull_request.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: manage pull requests - -on: pull_request - -jobs: - check: - name: manage pull request - runs-on: ubuntu-latest - permissions: - security-events: write - steps: - - name: checkout repository - uses: actions/checkout@v2 - - - name: install required packages - run: sudo apt-get update && sudo apt-get install -y libpci-dev libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev rpm librpm-dev libzstd-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev - - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - - - name: configure project - run: cmake -DBUILD_TESTS=On . - - - name: build project - run: cmake --build . -j$(nproc) --target package - - - name: run fastfetch - run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true - - - name: run flashfetch - run: ./flashfetch - - - name: run tests - run: ctest - - - name: perform CodeQL analysis - uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 3f2614ea6..cb9a308bb 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,8 +1,8 @@ name: manage pushes on: - push: - branches: [ master ] + - push + - pull_request jobs: linux: @@ -94,6 +94,7 @@ jobs: path: ./fastfetch-*.* release: + if: github.event_name == 'push' && github.ref == 'refs/heads/master' name: Release runs-on: ubuntu-latest needs: