Skip to content

Commit

Permalink
feat: put all CI code in shell files
Browse files Browse the repository at this point in the history
  • Loading branch information
aeimer committed Oct 25, 2023
1 parent 87a37b6 commit b49873f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
14 changes: 14 additions & 0 deletions .ci-scripts/commit-push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail

# Enable debug - print commands
#set -x

git config --global user.name 'QAware Homebrew Bot'
git config --global user.email 'qaware.homebrew.bot@qaware.de'
git add Aliases README.md
git commit --quiet -m "chore: update Aliases" || {
echo "Nothing to commit or commit failed, will exit now"
exit 0
}
git push
12 changes: 12 additions & 0 deletions .ci-scripts/install-packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail

# Enable debug - print commands
#set -x

# Install yq
# https://github.com/marketplace/actions/yq-portable-yaml-processor
wget -q -O yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
chmod +x yq
sudo mv yq /usr/bin/yq

17 changes: 3 additions & 14 deletions .github/workflows/create-aliases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Install packages
run: |
# https://github.com/marketplace/actions/yq-portable-yaml-processor
wget -q -O yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
chmod +x yq
sudo mv yq /usr/bin/yq
run: .ci-scripts/install-packages.sh

- name: Parse Formulas 1
run: .ci-scripts/parse-formulas.sh
Expand All @@ -38,12 +35,4 @@ jobs:
run: .ci-scripts/update-toc.sh

- name: Commit & Push changes
run: |
git config --global user.name 'QAware Homebrew Bot'
git config --global user.email 'qaware.homebrew.bot@qaware.de'
git add Aliases README.md
git commit --quiet -m "chore: update Aliases" || {
echo "Nothing to commit or commit failed, will exit now"
exit 0
}
git push
run: .ci-scripts/commit-push.sh

0 comments on commit b49873f

Please sign in to comment.