From 0332ac4214827686d0272ca9fa93b6ea8d5c1f13 Mon Sep 17 00:00:00 2001 From: Pavel Siska Date: Thu, 3 Oct 2024 17:22:50 +0200 Subject: [PATCH] github-action - integrate composite install dependecies action to workflows --- .github/workflows/build.yml | 7 ++++--- .github/workflows/check.yml | 7 +++++-- .github/workflows/copr.yaml | 16 ++++++++++------ 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e66677..eb8a945 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,11 +12,12 @@ jobs: runs-on: ubuntu-latest container: ${{ inputs.os }} steps: - - name: Install dependencies - run: | - dnf install -y make gcc-c++ cmake3 git rpm-build fuse3-devel + - name: Install git + run: dnf install -y git - name: Check out repository code uses: actions/checkout@v4 + - name: Install dependencies + uses: ./.github/actions/install-dependencies - name: Mark github workspace as safe run: git config --system --add safe.directory $PWD - name: make diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 84b7a35..58e378d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -7,11 +7,14 @@ jobs: runs-on: ubuntu-latest container: oraclelinux:9 steps: + - name: Install git + run: dnf install -y git - name: Check out repository code uses: actions/checkout@v4 - name: Install dependencies - run: | - dnf install -y make gcc-c++ clang clang-tools-extra cmake3 git rpm-build fuse3-devel + uses: ./.github/actions/install-dependencies + with: + clang-tools: true - name: make format-check run: make format - name: make tidy-check diff --git a/.github/workflows/copr.yaml b/.github/workflows/copr.yaml index 1b4e501..1de5aeb 100644 --- a/.github/workflows/copr.yaml +++ b/.github/workflows/copr.yaml @@ -1,6 +1,6 @@ name: release package on copr -on: +on: push: branches: - release @@ -10,13 +10,17 @@ jobs: runs-on: ubuntu-latest container: oraclelinux:8 steps: + - name: Install git + run: dnf install -y git + - name: Check out repository code + uses: actions/checkout@v4 - name: Install dependencies + uses: ./.github/actions/install-dependencies + - name: Install copr-cli run: | dnf install -y dnf-plugins-core epel-release dnf -y copr enable @CESNET/NEMEA - dnf install -y make gcc-c++ cmake3 git rpm-build fuse3-devel copr-cli - - name: Check out repository code - uses: actions/checkout@v4 + dnf install -y copr-cli - name: Mark github workspace as safe run: git config --system --add safe.directory $PWD - name: make rpm @@ -24,8 +28,8 @@ jobs: - name: Create copr config run: | mkdir ~/.config - echo "${{ secrets.COPR_CONFIG }}" >> ~/.config/copr - - name: Upload SRPM to copr + echo "${{ secrets.COPR_CONFIG }}" >> ~/.config/copr + - name: Upload SRPM to copr run: | copr build @CESNET/NEMEA build/pkg/rpm/rpmbuild/SRPMS/* copr build @CESNET/NEMEA-stable build/pkg/rpm/rpmbuild/SRPMS/*