Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
uvidyadharan committed Aug 18, 2022
0 parents commit 99e63ff
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 0 deletions.
15 changes: 15 additions & 0 deletions github-actions-tune/.github/workflows/default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Default

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Update apt sources
run: sudo apt-get update -y
- name: Install libguestfs-tools
run: sudo apt-get install libguestfs-tools -y
17 changes: 17 additions & 0 deletions github-actions-tune/.github/workflows/tuned.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Tuned

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Apply settings
run: ./speedup.sh
- name: Update apt sources
run: sudo apt-get update -y
- name: Install libguestfs-tools
run: sudo apt-get install libguestfs-tools -y
10 changes: 10 additions & 0 deletions github-actions-tune/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Forked from https://github.com/abbbi/github-actions-tune

Speed up your github actions on `ubuntu-latest`. For the full article, see:

[A few simple tricks to tune your github actions runtime](https://abbbi.github.io/actions/)

You can speed up your runtime by using this action repository
in your yml files, see:

[This example repository](https://github.com/abbbi/tuneme/blob/master/.github/workflows/tuned.yml)
7 changes: 7 additions & 0 deletions github-actions-tune/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: 'Speedup package installation'
description: 'Tune your runtime on ubuntu-latest'
runs:
using: "composite"
steps:
- run: ${{ github.action_path }}/speedup.sh
shell: bash
14 changes: 14 additions & 0 deletions github-actions-tune/speedup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
sudo sed -i 's/yes/no/g' /etc/initramfs-tools/update-initramfs.conf
sudo rm -f /var/lib/man-db/auto-update
sudo sed '/fontconfig/d' -i /var/lib/dpkg/triggers/File
sudo sed '/install-info/d' -i /var/lib/dpkg/triggers/File
sudo sed '/mime/d' -i /var/lib/dpkg/triggers/File
sudo sed '/hicolor-icon-theme/d' -i /var/lib/dpkg/triggers/File
echo "force-unsafe-io" | sudo tee -a /etc/dpkg/dpkg.cfg.d/force-unsafe-io
if [ -a /usr/bin/eatmydata ]; then
echo "eatmydata available"
echo -e '#!/bin/sh\nexec eatmydata /usr/bin/dpkg $@' | sudo tee /usr/local/bin/dpkg && sudo chmod +x /usr/local/bin/dpkg
echo -e '#!/bin/sh\nexec eatmydata /usr/bin/apt $@' | sudo tee /usr/local/bin/apt && sudo chmod +x /usr/local/bin/apt
echo -e '#!/bin/sh\nexec eatmydata /usr/bin/apt-get $@' | sudo tee /usr/local/bin/apt-get && sudo chmod +x /usr/local/bin/apt-get
fi

0 comments on commit 99e63ff

Please sign in to comment.