Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 04303ce8da | |||
| 89fcd71e20 | |||
| f5ada5953b | |||
| c53aa59f58 | |||
| 5b75404b8d | |||
| ffd91d234b | |||
| 602fae3c61 | |||
| 6e5fdcc377 | |||
| f0c37ce87f | |||
| 22a870372c | |||
| ee5d6e807d | |||
| a93ac07315 | |||
| cfcd11665c | |||
| 4076a2bcdb | |||
| 4de74c453f | |||
| f3d81c81b8 | |||
| e573cc1655 |
@@ -24,22 +24,30 @@ jobs:
|
|||||||
sed -i 's/.*image\:.*/ image\: \"Dockerfile\"/' action.yml
|
sed -i 's/.*image\:.*/ image\: \"Dockerfile\"/' action.yml
|
||||||
cat action.yml
|
cat action.yml
|
||||||
|
|
||||||
- name: Get sample PKGBUILD
|
- name: Get sample package
|
||||||
run: wget https://github.com/${{ github.repository_owner }}/plenti-bin/raw/f5ffaaee02a2119aa16f6b7a27e87e198e096b47/PKGBUILD
|
run: |
|
||||||
|
# Spotify 1:1.2.63.394-1
|
||||||
|
mkdir spotify
|
||||||
|
pushd spotify
|
||||||
|
wget https://github.com/christian-heusel/aur/raw/5032e51a0b493cb7149264ec27a761ac85c81933/spotify/PKGBUILD
|
||||||
|
wget https://github.com/christian-heusel/aur/raw/5032e51a0b493cb7149264ec27a761ac85c81933/spotify/.SRCINFO
|
||||||
|
wget https://github.com/christian-heusel/aur/raw/5032e51a0b493cb7149264ec27a761ac85c81933/spotify/LICENSE
|
||||||
|
wget https://github.com/christian-heusel/aur/raw/5032e51a0b493cb7149264ec27a761ac85c81933/spotify/spotify.protocol
|
||||||
|
wget https://github.com/christian-heusel/aur/raw/5032e51a0b493cb7149264ec27a761ac85c81933/spotify/spotify.sh
|
||||||
|
popd
|
||||||
- name: Running test
|
- name: Running test
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
pkgver: '0.4.26'
|
|
||||||
pkgrel: 2
|
pkgrel: 2
|
||||||
updpkgsums: true
|
updpkgsums: true
|
||||||
srcinfo: true
|
srcinfo: true
|
||||||
|
path: 'spotify'
|
||||||
|
pgpkeys: 'C85668DF69375001'
|
||||||
|
|
||||||
- name: Show diff
|
- name: Show diff
|
||||||
run: |
|
run: |
|
||||||
ls -la
|
ls -la
|
||||||
git diff PKGBUILD
|
git diff
|
||||||
git diff .SRCINFO
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
name: Publish OCI image
|
name: Publish OCI image
|
||||||
@@ -126,8 +134,7 @@ jobs:
|
|||||||
- name: Show diff
|
- name: Show diff
|
||||||
run: |
|
run: |
|
||||||
ls -la
|
ls -la
|
||||||
git diff PKGBUILD
|
git diff
|
||||||
git diff .SRCINFO
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
.idea
|
||||||
+21
-1
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [2.4.0] - 2025-06-01
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Loading PGP Key support - by @dcelasun
|
||||||
|
|
||||||
|
## [2.3.0] - 2025-05-27
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Copy all package files, not just PKGBUILD - by @dcelasun
|
||||||
|
- Multilib support - by @dcelasun
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Keryring is not updated - by @cilki
|
||||||
|
|
||||||
## [2.2.1] - 2024-02-19
|
## [2.2.1] - 2024-02-19
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
@@ -104,7 +121,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
- Initial release
|
- Initial release
|
||||||
|
|
||||||
[Unreleased]: https://github.com/hapakaien/archlinux-package-action/compare/v2.2.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
|
[2.2.0]: https://github.com/hapakaien/archlinux-package-action/compare/v2.1.1...v2.2.0
|
||||||
[2.1.1]: https://github.com/hapakaien/archlinux-package-action/compare/v2.1.0...v2.1.1
|
[2.1.1]: https://github.com/hapakaien/archlinux-package-action/compare/v2.1.0...v2.1.1
|
||||||
[2.1.0]: https://github.com/hapakaien/archlinux-package-action/compare/v2.0.3...v2.1.0
|
[2.1.0]: https://github.com/hapakaien/archlinux-package-action/compare/v2.0.3...v2.1.0
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
# Base image
|
# Base image
|
||||||
FROM docker.io/library/archlinux:base-devel
|
FROM docker.io/library/archlinux:multilib-devel
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN pacman -Syu --needed --noconfirm pacman-contrib namcap git
|
RUN pacman -Syu --needed --noconfirm pacman-contrib namcap git
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Here's what this action can do:
|
|||||||
Following inputs can be used as `step.with` keys
|
Following inputs can be used as `step.with` keys
|
||||||
|
|
||||||
| Name | Type | Default | Required | Description |
|
| Name | Type | Default | Required | Description |
|
||||||
| -------------------------- | ------- | ------------------ | -------- | -------------------------------------------------------------------------------- |
|
|----------------------------|---------|-------------------------------|----------|----------------------------------------------------------------------------------|
|
||||||
| `path` | String | | `false` | Path where PKGBUILD is located. This path always located under $GITHUB_WORKSPACE |
|
| `path` | String | | `false` | Path where PKGBUILD is located. This path always located under $GITHUB_WORKSPACE |
|
||||||
| `pkgver` | String | | `false` | Update `pkgver` on your PKGBUILD |
|
| `pkgver` | String | | `false` | Update `pkgver` on your PKGBUILD |
|
||||||
| `pkgrel` | Integer | | `false` | Update `pkgrel` on your PKGBUILD |
|
| `pkgrel` | Integer | | `false` | Update `pkgrel` on your PKGBUILD |
|
||||||
@@ -32,6 +32,8 @@ Following inputs can be used as `step.with` keys
|
|||||||
| `flags` | String | `-cfs --noconfirm` | `false` | Flags after `makepkg` command. Leave this empty will disable this command. |
|
| `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 paru |
|
||||||
| `update_archlinux_keyring` | Boolean | `true` | `false` | Update the archlinux keyring |
|
| `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
|
### Examples
|
||||||
|
|
||||||
|
|||||||
+13
-3
@@ -39,14 +39,22 @@ inputs:
|
|||||||
description: 'Resolve dependencies using paru'
|
description: 'Resolve dependencies using paru'
|
||||||
default: 'false'
|
default: 'false'
|
||||||
required: false
|
required: false
|
||||||
update_archlinux_keyring:
|
archlinux_keyring:
|
||||||
description: 'Update archlinux-keyring'
|
description: 'Update archlinux-keyring'
|
||||||
default: 'true'
|
default: 'true'
|
||||||
required: false
|
required: false
|
||||||
|
pgpkeys:
|
||||||
|
description: 'Comma-separated pgp keys'
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
pgpkeyserver:
|
||||||
|
description: 'PGP key server'
|
||||||
|
default: 'hkps://keyserver.ubuntu.com'
|
||||||
|
required: false
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'docker://ghcr.io/heyhusen/archlinux-package-action:2'
|
image: Dockerfile
|
||||||
args:
|
args:
|
||||||
- ${{ inputs.path }}
|
- ${{ inputs.path }}
|
||||||
- ${{ inputs.pkgver }}
|
- ${{ inputs.pkgver }}
|
||||||
@@ -56,4 +64,6 @@ runs:
|
|||||||
- ${{ inputs.flags }}
|
- ${{ inputs.flags }}
|
||||||
- ${{ inputs.namcap }}
|
- ${{ inputs.namcap }}
|
||||||
- ${{ inputs.aur }}
|
- ${{ inputs.aur }}
|
||||||
- ${{ inputs.update_archlinux_keyring }}
|
- ${{ inputs.archlinux_keyring }}
|
||||||
|
- ${{ inputs.pgpkeys }}
|
||||||
|
- ${{ inputs.pgpkeyserver }}
|
||||||
|
|||||||
+28
-9
@@ -2,21 +2,38 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Set path
|
# Set path
|
||||||
WORKPATH=$GITHUB_WORKSPACE/$INPUT_PATH
|
|
||||||
HOME=/home/builder
|
HOME=/home/builder
|
||||||
echo "::group::Copying files from $WORKPATH to $HOME/gh-action"
|
echo "::group::Copying files from $GITHUB_WORKSPACE to $HOME/gh-action"
|
||||||
# Set path permision
|
# Set path permision
|
||||||
cd $HOME
|
cd $HOME
|
||||||
mkdir gh-action
|
mkdir gh-action
|
||||||
cd 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.
|
||||||
|
if [[ -n $INPUT_PATH ]]; then
|
||||||
|
cp -rTfv "$GITHUB_WORKSPACE"/ ./
|
||||||
|
cd $INPUT_PATH
|
||||||
|
else
|
||||||
|
# Without a custom path though, we can just grab the .git directory and the PKGBUILD.
|
||||||
cp -rfv "$GITHUB_WORKSPACE"/.git ./
|
cp -rfv "$GITHUB_WORKSPACE"/.git ./
|
||||||
cp -fv "$WORKPATH"/PKGBUILD ./
|
cp -fv "$GITHUB_WORKSPACE"/PKGBUILD ./
|
||||||
|
fi
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
# Update archlinux-keyring
|
# Update archlinux-keyring
|
||||||
if [[ $INPUT_ARCHLINUX_KEYRING == true ]]; then
|
if [[ $INPUT_ARCHLINUX_KEYRING == true ]]; then
|
||||||
echo "::group::Updating archlinux-keyring"
|
echo "::group::Updating archlinux-keyring"
|
||||||
pacman -S archlinux-keyring
|
sudo pacman -Syu --noconfirm archlinux-keyring
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -24,15 +41,15 @@ fi
|
|||||||
if [[ -n $INPUT_PKGVER ]]; then
|
if [[ -n $INPUT_PKGVER ]]; then
|
||||||
echo "::group::Updating pkgver on PKGBUILD"
|
echo "::group::Updating pkgver on PKGBUILD"
|
||||||
sed -i "s:^pkgver=.*$:pkgver=$INPUT_PKGVER:g" PKGBUILD
|
sed -i "s:^pkgver=.*$:pkgver=$INPUT_PKGVER:g" PKGBUILD
|
||||||
git diff PKGBUILD
|
git --no-pager diff PKGBUILD
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update pkgver
|
# Update pkgrel
|
||||||
if [[ -n $INPUT_PKGREL ]]; then
|
if [[ -n $INPUT_PKGREL ]]; then
|
||||||
echo "::group::Updating pkgrel on PKGBUILD"
|
echo "::group::Updating pkgrel on PKGBUILD"
|
||||||
sed -i "s:^pkgrel=.*$:pkgrel=$INPUT_PKGREL:g" PKGBUILD
|
sed -i "s:^pkgrel=.*$:pkgrel=$INPUT_PKGREL:g" PKGBUILD
|
||||||
git diff PKGBUILD
|
git --no-pager diff PKGBUILD
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -40,7 +57,7 @@ fi
|
|||||||
if [[ $INPUT_UPDPKGSUMS == true ]]; then
|
if [[ $INPUT_UPDPKGSUMS == true ]]; then
|
||||||
echo "::group::Updating checksums on PKGBUILD"
|
echo "::group::Updating checksums on PKGBUILD"
|
||||||
updpkgsums
|
updpkgsums
|
||||||
git diff PKGBUILD
|
git --no-pager diff PKGBUILD
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -48,7 +65,7 @@ fi
|
|||||||
if [[ $INPUT_SRCINFO == true ]]; then
|
if [[ $INPUT_SRCINFO == true ]]; then
|
||||||
echo "::group::Generating new .SRCINFO based on PKGBUILD"
|
echo "::group::Generating new .SRCINFO based on PKGBUILD"
|
||||||
makepkg --printsrcinfo >.SRCINFO
|
makepkg --printsrcinfo >.SRCINFO
|
||||||
git diff .SRCINFO
|
git --no-pager diff .SRCINFO
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -74,6 +91,8 @@ if [[ -n $INPUT_FLAGS ]]; then
|
|||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
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"
|
echo "::group::Copying files from $HOME/gh-action to $WORKPATH"
|
||||||
sudo cp -fv PKGBUILD "$WORKPATH"/PKGBUILD
|
sudo cp -fv PKGBUILD "$WORKPATH"/PKGBUILD
|
||||||
if [[ -e .SRCINFO ]]; then
|
if [[ -e .SRCINFO ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user