Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
a54ab8ca52
|
|||
| 27228fcea0 | |||
| 33fcb33ba6 | |||
| 150a5303df | |||
| c9f94059cc | |||
| 5c996bd4d2 | |||
| 3bffac3ae7 | |||
| 91e8b8c11d | |||
| 347dece6de | |||
| 500fc82963 | |||
| c373f73845 | |||
| 08dba55302 | |||
| bed26d7507 | |||
| 8fa9eb7023 | |||
| f87823ed79 | |||
| f74e99ad3c | |||
| 5f746d9353 | |||
| 2afeaa64ad | |||
| adae81c2d0 | |||
| 04303ce8da | |||
| 89fcd71e20 | |||
| f5ada5953b | |||
| c53aa59f58 |
@@ -4,4 +4,4 @@ updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
interval: "weekly"
|
||||
|
||||
+21
-15
@@ -17,7 +17,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Update action.yml to build locally
|
||||
run: |
|
||||
@@ -26,21 +26,23 @@ jobs:
|
||||
|
||||
- name: Get sample package
|
||||
run: |
|
||||
mkdir visual-studio-code-bin
|
||||
pushd visual-studio-code-bin
|
||||
wget https://github.com/dcelasun/pkgbuilds/raw/ee68e4c19c40a0a36a50e289259fcfd94f43786d/visual-studio-code-bin/PKGBUILD
|
||||
wget https://github.com/dcelasun/pkgbuilds/raw/ee68e4c19c40a0a36a50e289259fcfd94f43786d/visual-studio-code-bin/.SRCINFO
|
||||
wget https://github.com/dcelasun/pkgbuilds/raw/ee68e4c19c40a0a36a50e289259fcfd94f43786d/visual-studio-code-bin/visual-studio-code-bin.install
|
||||
wget https://github.com/dcelasun/pkgbuilds/raw/ee68e4c19c40a0a36a50e289259fcfd94f43786d/visual-studio-code-bin/visual-studio-code-bin.sh
|
||||
# Spotify 1:1.2.79.427-1
|
||||
mkdir spotify
|
||||
pushd spotify
|
||||
wget https://github.com/christian-heusel/aur/raw/f12a03c830a3d4a5c16de561bf411eec55d0798c/spotify/PKGBUILD
|
||||
wget https://github.com/christian-heusel/aur/raw/f12a03c830a3d4a5c16de561bf411eec55d0798c/spotify/.SRCINFO
|
||||
wget https://github.com/christian-heusel/aur/raw/f12a03c830a3d4a5c16de561bf411eec55d0798c/spotify/LICENSE
|
||||
wget https://github.com/christian-heusel/aur/raw/f12a03c830a3d4a5c16de561bf411eec55d0798c/spotify/spotify.protocol
|
||||
wget https://github.com/christian-heusel/aur/raw/f12a03c830a3d4a5c16de561bf411eec55d0798c/spotify/spotify.sh
|
||||
popd
|
||||
- name: Running test
|
||||
uses: ./
|
||||
with:
|
||||
pkgver: '1.100.1'
|
||||
pkgrel: 1
|
||||
pkgrel: 2
|
||||
updpkgsums: true
|
||||
srcinfo: true
|
||||
path: 'visual-studio-code-bin'
|
||||
path: 'spotify'
|
||||
pgpkeys: '5384CE82BA52C83A'
|
||||
|
||||
- name: Show diff
|
||||
run: |
|
||||
@@ -52,10 +54,12 @@ jobs:
|
||||
needs: pretest
|
||||
if: github.event_name != 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Log in to ghcr.io
|
||||
uses: redhat-actions/podman-login@v1
|
||||
@@ -104,7 +108,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Get sample PKGBUILD
|
||||
run: wget https://github.com/${{ github.repository_owner }}/plenti-bin/raw/f5ffaaee02a2119aa16f6b7a27e87e198e096b47/PKGBUILD
|
||||
@@ -136,17 +140,19 @@ jobs:
|
||||
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Get branch/tag names
|
||||
id: branch-name
|
||||
uses: tj-actions/branch-names@v8
|
||||
uses: tj-actions/branch-names@v9
|
||||
with:
|
||||
strip_tag_prefix: "v"
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
.idea
|
||||
+14
-1
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [3.0.0] - 2026-01-16
|
||||
|
||||
### Changed
|
||||
|
||||
- Replace paru with yay - by @dcelasun
|
||||
|
||||
## [2.4.0] - 2025-06-01
|
||||
|
||||
### Added
|
||||
|
||||
- Loading PGP Key support - by @dcelasun
|
||||
|
||||
## [2.3.0] - 2025-05-27
|
||||
|
||||
### Added
|
||||
@@ -115,7 +127,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
- Initial release
|
||||
|
||||
[Unreleased]: https://github.com/hapakaien/archlinux-package-action/compare/v2.3.0...HEAD
|
||||
[Unreleased]: https://github.com/hapakaien/archlinux-package-action/compare/v2.4.0...HEAD
|
||||
[2.4.0]: https://github.com/hapakaien/archlinux-package-action/compare/v2.3.0...v2.4.0
|
||||
[2.3.0]: https://github.com/hapakaien/archlinux-package-action/compare/v2.2.1...v2.3.0
|
||||
[2.2.1]: https://github.com/hapakaien/archlinux-package-action/compare/v2.2.0...v2.2.1
|
||||
[2.2.0]: https://github.com/hapakaien/archlinux-package-action/compare/v2.1.1...v2.2.0
|
||||
|
||||
+3
-3
@@ -10,9 +10,9 @@ RUN useradd -m builder && \
|
||||
WORKDIR /home/builder
|
||||
USER builder
|
||||
|
||||
# Install paru
|
||||
RUN git clone https://aur.archlinux.org/paru-bin.git
|
||||
RUN cd paru-bin && makepkg -si --noconfirm
|
||||
# Install yay
|
||||
RUN git clone https://aur.archlinux.org/yay-bin.git
|
||||
RUN cd yay-bin && makepkg -si --noconfirm
|
||||
|
||||
# Copy files
|
||||
COPY LICENSE README.md /
|
||||
|
||||
@@ -22,7 +22,7 @@ Here's what this action can do:
|
||||
Following inputs can be used as `step.with` keys
|
||||
|
||||
| Name | Type | Default | Required | Description |
|
||||
| -------------------------- | ------- | ------------------ | -------- | -------------------------------------------------------------------------------- |
|
||||
|----------------------------|---------|-------------------------------|----------|----------------------------------------------------------------------------------|
|
||||
| `path` | String | | `false` | Path where PKGBUILD is located. This path always located under $GITHUB_WORKSPACE |
|
||||
| `pkgver` | String | | `false` | Update `pkgver` on your PKGBUILD |
|
||||
| `pkgrel` | Integer | | `false` | Update `pkgrel` on your PKGBUILD |
|
||||
@@ -30,8 +30,10 @@ Following inputs can be used as `step.with` keys
|
||||
| `srcinfo` | Boolean | `false` | `false` | Generate new .SRCINFO |
|
||||
| `namcap` | Boolean | `true` | `false` | Validate PKGBUILD |
|
||||
| `flags` | String | `-cfs --noconfirm` | `false` | Flags after `makepkg` command. Leave this empty will disable this command. |
|
||||
| `aur` | Boolean | `false` | `false` | Resolve dependencies using paru |
|
||||
| `aur` | Boolean | `false` | `false` | Resolve dependencies using yay |
|
||||
| `update_archlinux_keyring` | Boolean | `true` | `false` | Update the archlinux keyring |
|
||||
| `pgpkeys` | String | | `false` | Comma-separated PGP public keys to be loaded before calling makepkg. |
|
||||
| `pgpkeyserver` | String | `hkps://keyserver.ubuntu.com` | `false` | PGP key server address. |
|
||||
|
||||
### Examples
|
||||
|
||||
@@ -54,7 +56,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Validate package
|
||||
uses: heyhusen/archlinux-package-action@v2
|
||||
uses: heyhusen/archlinux-package-action@v3
|
||||
```
|
||||
|
||||
#### 2. Only generate .SRCINFO
|
||||
@@ -74,7 +76,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Validate package
|
||||
uses: heyhusen/archlinux-package-action@v2
|
||||
uses: heyhusen/archlinux-package-action@v3
|
||||
with:
|
||||
flags: ''
|
||||
namcap: false
|
||||
@@ -98,7 +100,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Validate package
|
||||
uses: heyhusen/archlinux-package-action@v2
|
||||
uses: heyhusen/archlinux-package-action@v3
|
||||
with:
|
||||
flags: ''
|
||||
namcap: false
|
||||
@@ -122,7 +124,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Validate package
|
||||
uses: heyhusen/archlinux-package-action@v2
|
||||
uses: heyhusen/archlinux-package-action@v3
|
||||
with:
|
||||
path: package
|
||||
flags: '-si --noconfirm'
|
||||
|
||||
+11
-1
@@ -36,13 +36,21 @@ inputs:
|
||||
default: 'true'
|
||||
required: false
|
||||
aur:
|
||||
description: 'Resolve dependencies using paru'
|
||||
description: 'Resolve dependencies using yay'
|
||||
default: 'false'
|
||||
required: false
|
||||
archlinux_keyring:
|
||||
description: 'Update archlinux-keyring'
|
||||
default: 'true'
|
||||
required: false
|
||||
pgpkeys:
|
||||
description: 'Comma-separated pgp keys'
|
||||
default: ''
|
||||
required: false
|
||||
pgpkeyserver:
|
||||
description: 'PGP key server'
|
||||
default: 'hkps://keyserver.ubuntu.com'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: 'docker'
|
||||
@@ -57,3 +65,5 @@ runs:
|
||||
- ${{ inputs.namcap }}
|
||||
- ${{ inputs.aur }}
|
||||
- ${{ inputs.archlinux_keyring }}
|
||||
- ${{ inputs.pgpkeys }}
|
||||
- ${{ inputs.pgpkeyserver }}
|
||||
|
||||
+16
-7
@@ -9,6 +9,14 @@ cd $HOME
|
||||
mkdir gh-action
|
||||
cd gh-action
|
||||
|
||||
if [[ -n $INPUT_PGPKEYS ]]; then
|
||||
echo "::group::Loading PGP keys"
|
||||
for key in ${INPUT_PGPKEYS//,/$'\n'}; do
|
||||
gpg --keyserver $INPUT_PGPKEYSERVER --recv-keys $key
|
||||
done
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
||||
# If there is a custom path, we need to copy the whole repository
|
||||
# because we run "git diff" at several stages and without the entire
|
||||
# tree the output will be incorrect.
|
||||
@@ -33,7 +41,7 @@ fi
|
||||
if [[ -n $INPUT_PKGVER ]]; then
|
||||
echo "::group::Updating pkgver on PKGBUILD"
|
||||
sed -i "s:^pkgver=.*$:pkgver=$INPUT_PKGVER:g" PKGBUILD
|
||||
git diff PKGBUILD
|
||||
git --no-pager diff PKGBUILD
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
||||
@@ -41,7 +49,7 @@ fi
|
||||
if [[ -n $INPUT_PKGREL ]]; then
|
||||
echo "::group::Updating pkgrel on PKGBUILD"
|
||||
sed -i "s:^pkgrel=.*$:pkgrel=$INPUT_PKGREL:g" PKGBUILD
|
||||
git diff PKGBUILD
|
||||
git --no-pager diff PKGBUILD
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
||||
@@ -49,7 +57,7 @@ fi
|
||||
if [[ $INPUT_UPDPKGSUMS == true ]]; then
|
||||
echo "::group::Updating checksums on PKGBUILD"
|
||||
updpkgsums
|
||||
git diff PKGBUILD
|
||||
git --no-pager diff PKGBUILD
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
||||
@@ -57,7 +65,7 @@ fi
|
||||
if [[ $INPUT_SRCINFO == true ]]; then
|
||||
echo "::group::Generating new .SRCINFO based on PKGBUILD"
|
||||
makepkg --printsrcinfo >.SRCINFO
|
||||
git diff .SRCINFO
|
||||
git --no-pager diff .SRCINFO
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
||||
@@ -68,11 +76,11 @@ if [[ $INPUT_NAMCAP == true ]]; then
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
||||
# Install depends using paru from aur
|
||||
# Install depends using yay from aur
|
||||
if [[ $INPUT_AUR == true ]]; then
|
||||
echo "::group::Installing depends using paru"
|
||||
echo "::group::Installing depends using yay"
|
||||
source PKGBUILD
|
||||
paru -Syu --removemake --needed --noconfirm "${depends[@]}" "${makedepends[@]}"
|
||||
yay -Syu --removemake --needed --noconfirm "${depends[@]}" "${makedepends[@]}"
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
||||
@@ -87,6 +95,7 @@ WORKPATH=$GITHUB_WORKSPACE/$INPUT_PATH
|
||||
WORKPATH=${WORKPATH%/} # Remove trailing slash if $INPUT_PATH is empty
|
||||
echo "::group::Copying files from $HOME/gh-action to $WORKPATH"
|
||||
sudo cp -fv PKGBUILD "$WORKPATH"/PKGBUILD
|
||||
sudo cp -fv *.pkg.tar.zst "$WORKPATH"
|
||||
if [[ -e .SRCINFO ]]; then
|
||||
sudo cp -fv .SRCINFO "$WORKPATH"/.SRCINFO
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user