Merge pull request #121 from dyc3/CI-AUR-install

CI AUR install
This commit is contained in:
Carson McManus 2022-01-15 12:03:16 -05:00 committed by GitHub
commit 86d5f40989
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 0 deletions

16
.github/workflows/aur-checker.yml vendored Normal file
View file

@ -0,0 +1,16 @@
name: AUR install
on:
schedule:
- cron: "32 5 */3 * *"
push:
branches: [ master, main ]
jobs:
test-install:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install AUR package
run: ./scripts/check-aur.sh

1
.gitignore vendored
View file

@ -6,6 +6,7 @@ SteamAuth/SteamAuth/packages/
test_maFiles/
*.deb
*.tar.gz
target/
aur/

15
scripts/check-aur.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
# Performs a test install of the package from the AUR. If the package fails to install, there should be a non-zero exit code.
# Intended for use with CI.
set -e
cd scripts/docker/arch/
tar -cvf arch-docker.tar.gz .
docker image build -t steamguard-cli-archlinux-builder - < arch-docker.tar.gz
rm arch-docker.tar.gz
docker run -it --rm steamguard-cli-archlinux-builder /bin/bash -c "./install.sh steamguard-cli-git && steamguard-cli --version"
docker image rm steamguard-cli-archlinux-builder:latest

View file

@ -0,0 +1,3 @@
FROM greyltc/archlinux-aur:yay
COPY install.sh /install.sh

5
scripts/docker/arch/install.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
PACKAGE="$1"
echo "Installing $PACKAGE"
sudo -u ab -D~ bash -c "yay -Syu --removemake --needed --noprogressbar --noconfirm $PACKAGE"