Skip to content

Commit

Permalink
created action for deps installation (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
floryn90 authored Sep 29, 2024
2 parents 5b74377 + 1873147 commit fc4dac3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 39 deletions.
16 changes: 16 additions & 0 deletions .github/actions/install_deps/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Install required dependencies
description: Install required build dependencies
runs:
using: composite
steps:
- name: Install deps
shell: bash
run: |-
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt-get install dirmngr -y
sudo apt-get update
sudo apt-get install gh build-essential wget git curl gpg jq -y
sudo apt-get autoclean
sudo apt-get autoremove
sudo rm -rf /var/lib/apt/lists/*
11 changes: 1 addition & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,7 @@ jobs:
uses: actions/checkout@v4

- name: Install build essential
shell: bash
run: |-
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt-get install dirmngr -y
sudo apt-get update
sudo apt-get install gh build-essential wget -y
sudo apt-get autoclean
sudo apt-get autoremove
sudo rm -rf /var/lib/apt/lists/*
uses: ./github/actions/install_deps

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,7 @@ jobs:
uses: actions/checkout@v4

- name: Install build essential
shell: bash
run: |
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt-get install dirmngr -y
sudo apt-get update
sudo apt-get install gh build-essential wget -y
sudo apt-get autoclean
sudo apt-get autoremove
sudo rm -rf /var/lib/apt/lists/*
uses: ./github/actions/install_deps

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ jobs:
Analysis:
runs-on: floryn90-runners
steps:
- name: Install required tools
shell: bash
run: |
sudo apt update
sudo apt install -y git curl

- name: Install build essential
uses: ./github/actions/install_deps

- name: Checkout
uses: actions/checkout@v4
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/version_bump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,9 @@ jobs:
update:
runs-on: floryn90-runners
steps:
- name: Install curl & gpg
shell: bash
run: sudo apt update && sudo apt -y install curl gpg jq git build-essential && sudo apt clean

- name: Install gh cli
shell: bash
run: |
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt-get install dirmngr -y
sudo apt-get update
sudo apt-get install gh -y
sudo apt-get autoclean
sudo apt-get autoremove
sudo rm -rf /var/lib/apt/lists/*
- name: Install build essential
uses: ./github/actions/install_deps

- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit fc4dac3

Please sign in to comment.