Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Slinet6056 committed Sep 4, 2024
1 parent 7c8e5c4 commit eba49c5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 16 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@ name: Test build

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- uses: actions/checkout@master

- name: Build Package
uses: ./
with:
package_name: ciallo
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Build Package
uses: ./
with:
package_name: ciallo
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
pkgs_directory: test

- name: Upload Package
uses: actions/upload-artifact@main
with:
name: ciallo-package
path: test/ciallo/*.pkg.tar.zst*
- name: Upload Package
uses: actions/upload-artifact@main
with:
name: ciallo-package
path: test/ciallo/*.pkg.tar.zst*
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
FROM archlinux:base-devel

RUN pacman -Syu --noconfirm
RUN pacman -S git gnupg --noconfirm
RUN pacman -S git gnupg tree --noconfirm

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ inputs:
gpg_passphrase:
description: "GPG passphrase for building"
required: true
pkgs_directory:
description: "Directory of package subdirectories"
required: false
default: "."
runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.package_name }}
- ${{ inputs.gpg_private_key }}
- ${{ inputs.gpg_passphrase }}
- ${{ inputs.pkgs_directory }}
4 changes: 3 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ set -e
pkgname=$1
gpg_private_key=$2
gpg_passphrase=$3
pkgdir=$4

# Create builder user
useradd builder -m
echo "builder ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers

# Find the PKGBUILD directory
pkgbuild_dir=$(readlink -f "$pkgname")
pkgbuild_dir=$(readlink -f "$pkgdir/$pkgname")
tree

if [[ ! -d $pkgbuild_dir ]]; then
echo "$pkgbuild_dir should be a directory."
Expand Down

0 comments on commit eba49c5

Please sign in to comment.