Compare commits
60 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b75404b8d | |||
| ffd91d234b | |||
| 602fae3c61 | |||
| 6e5fdcc377 | |||
| f0c37ce87f | |||
| 22a870372c | |||
| ee5d6e807d | |||
| a93ac07315 | |||
| cfcd11665c | |||
| 4076a2bcdb | |||
| 4de74c453f | |||
| f3d81c81b8 | |||
| e573cc1655 | |||
| e58b416119 | |||
| 3f13112064 | |||
| 8a82ee672c | |||
| 20d8479ebc | |||
| 9fd24ca405 | |||
| f7376aba0b | |||
| 5e383b10b5 | |||
| 8f5e879913 | |||
| 47fa19da38 | |||
| fd1dbe5048 | |||
| c058d80ac5 | |||
| aa9be96cf9 | |||
| bc32e723f3 | |||
| f699bb5cff | |||
| 0f306e414a | |||
| f9ff68181b | |||
| 94f928c5df | |||
| 099605a64c | |||
| d3aea41d02 | |||
| 618a0ba862 | |||
| c9118ad67a | |||
| 2d9dafa60e | |||
| ae967066cb | |||
| cf8509924b | |||
| 1a92d6efa7 | |||
| 8dc2e4d3e8 | |||
| 37bda140be | |||
| f710e16a35 | |||
| 7118f1dd24 | |||
| fda333bd87 | |||
| 80d76aa524 | |||
| 77f37ad6f1 | |||
| c3e3ab0325 | |||
| b257397a15 | |||
| a4f0a491d0 | |||
| eadb0293c0 | |||
| 9400d7c75d | |||
| c121cf29d7 | |||
| 265fe9f569 | |||
| 66d669bebf | |||
| e346bea956 | |||
| 6ade55c2b2 | |||
| 8455f15e27 | |||
| 594be7f44a | |||
| 0a161adbcd | |||
| 94c0a400c6 | |||
| 4da3a1b0cc |
+28
-17
@@ -17,29 +17,35 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.4.0
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Update action.yml to build locally
|
||||
run: |
|
||||
sed -i 's/.*image\:.*/ image\: \"Dockerfile\"/' action.yml
|
||||
cat action.yml
|
||||
|
||||
- name: Get sample PKGBUILD
|
||||
run: wget https://github.com/hapakaien/plenti-bin/raw/f5ffaaee02a2119aa16f6b7a27e87e198e096b47/PKGBUILD
|
||||
|
||||
- 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
|
||||
popd
|
||||
- name: Running test
|
||||
uses: ./
|
||||
with:
|
||||
pkgver: '0.4.26'
|
||||
pkgrel: 2
|
||||
pkgver: '1.100.1'
|
||||
pkgrel: 1
|
||||
updpkgsums: true
|
||||
srcinfo: true
|
||||
path: 'visual-studio-code-bin'
|
||||
|
||||
- name: Show diff
|
||||
run: |
|
||||
ls -la
|
||||
git diff PKGBUILD
|
||||
git diff .SRCINFO
|
||||
git diff
|
||||
|
||||
publish:
|
||||
name: Publish OCI image
|
||||
@@ -49,7 +55,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.4.0
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to ghcr.io
|
||||
uses: redhat-actions/podman-login@v1
|
||||
@@ -60,7 +66,7 @@ jobs:
|
||||
|
||||
- name: OCI metadata
|
||||
id: metadata
|
||||
uses: docker/metadata-action@v3
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
tags: |
|
||||
@@ -98,15 +104,21 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.4.0
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get sample PKGBUILD
|
||||
run: wget https://github.com/hapakaien/plenti-bin/raw/f5ffaaee02a2119aa16f6b7a27e87e198e096b47/PKGBUILD
|
||||
run: wget https://github.com/${{ github.repository_owner }}/plenti-bin/raw/f5ffaaee02a2119aa16f6b7a27e87e198e096b47/PKGBUILD
|
||||
|
||||
- name: Update action.yml to use edge tagged container image
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
sed -i 's/.*image\:.*/ image\: \"docker\:\/\/ghcr.io\/${{ github.repository_owner }}\/${{ github.event.repository.name }}\:edge\"/' action.yml
|
||||
REPOSITORY_OWNER=${{ github.repository_owner }}
|
||||
REPOSITORY_OWNER=$(echo $REPOSITORY_OWNER | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
REPOSITORY_NAME=${{ github.event.repository.name }}
|
||||
REPOSITORY_NAME=$(echo $REPOSITORY_NAME | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
sed -i "s/.*image\:.*/ image\: \"docker\:\/\/ghcr.io\/${REPOSITORY_OWNER}\/${REPOSITORY_NAME}\:edge\"/" action.yml
|
||||
cat action.yml
|
||||
|
||||
- name: Running test
|
||||
@@ -120,8 +132,7 @@ jobs:
|
||||
- name: Show diff
|
||||
run: |
|
||||
ls -la
|
||||
git diff PKGBUILD
|
||||
git diff .SRCINFO
|
||||
git diff
|
||||
|
||||
release:
|
||||
name: Release
|
||||
@@ -131,11 +142,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.4.0
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get branch/tag names
|
||||
id: branch-name
|
||||
uses: tj-actions/branch-names@v5
|
||||
uses: tj-actions/branch-names@v8
|
||||
with:
|
||||
strip_tag_prefix: "v"
|
||||
|
||||
|
||||
+63
-1
@@ -7,6 +7,60 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [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
|
||||
|
||||
### Fixed
|
||||
|
||||
- Can't pull docker image, so sorry guys
|
||||
|
||||
## [2.2.0] - 2022-08-05
|
||||
|
||||
### Added
|
||||
|
||||
- Option to update archlinux-keyring - by @ReenigneArcher
|
||||
- Make repository name lowercase - by @ReenigneArcher
|
||||
|
||||
## [2.1.1] - 2022-05-15
|
||||
|
||||
### Fixed
|
||||
|
||||
- Wrong conditional using paru
|
||||
|
||||
## [2.1.0] - 2022-05-05
|
||||
|
||||
### Added
|
||||
|
||||
- Option to resolve deps using paru (from AUR) - by @kamack38
|
||||
|
||||
## [2.0.3] - 2022-02-02
|
||||
|
||||
### Fixed
|
||||
|
||||
- Copied PKGBUILD file has wrong permission
|
||||
|
||||
## [2.0.2] - 2022-02-02
|
||||
|
||||
### Fixed
|
||||
|
||||
- CI can not read changelog
|
||||
|
||||
## [2.0.1] - 2022-02-02
|
||||
|
||||
### Fixed
|
||||
|
||||
- Wrong OCI image tag at action.yml
|
||||
|
||||
## [2.0.0] - 2022-02-02
|
||||
|
||||
### Changed
|
||||
@@ -61,7 +115,15 @@ 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.0.0...HEAD
|
||||
[Unreleased]: https://github.com/hapakaien/archlinux-package-action/compare/v2.3.0...HEAD
|
||||
[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.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.0.3]: https://github.com/hapakaien/archlinux-package-action/compare/v2.0.2...v2.0.3
|
||||
[2.0.2]: https://github.com/hapakaien/archlinux-package-action/compare/v2.0.1...v2.0.2
|
||||
[2.0.1]: https://github.com/hapakaien/archlinux-package-action/compare/v2.0.0...v2.0.1
|
||||
[2.0.0]: https://github.com/hapakaien/archlinux-package-action/compare/v1.1.1...v2.0.0
|
||||
[1.1.1]: https://github.com/hapakaien/archlinux-package-action/compare/v1.1.0...v1.1.1
|
||||
[1.1.0]: https://github.com/hapakaien/archlinux-package-action/compare/v1.0.3...v1.1.0
|
||||
|
||||
+5
-1
@@ -1,5 +1,5 @@
|
||||
# Base image
|
||||
FROM docker.io/library/archlinux:base-devel
|
||||
FROM docker.io/library/archlinux:multilib-devel
|
||||
|
||||
# Install dependencies
|
||||
RUN pacman -Syu --needed --noconfirm pacman-contrib namcap git
|
||||
@@ -10,6 +10,10 @@ 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
|
||||
|
||||
# Copy files
|
||||
COPY LICENSE README.md /
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Arch Linux's package tools action
|
||||
|
||||
[](https://github.com/hapakaien/archlinux-package-action/actions) [](https://github.com/hapakaien/archlinux-package-action/releases) [](./LICENSE)
|
||||
[](https://github.com/heyhusen/archlinux-package-action/actions) [](https://github.com/heyhusen/archlinux-package-action/releases) [](./LICENSE)
|
||||
|
||||
This action allows running tools needed for creating Arch Linux (and AUR) package.
|
||||
Here's what this action can do:
|
||||
@@ -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,6 +30,8 @@ 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 |
|
||||
| `update_archlinux_keyring` | Boolean | `true` | `false` | Update the archlinux keyring |
|
||||
|
||||
### Examples
|
||||
|
||||
@@ -52,7 +54,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Validate package
|
||||
uses: hapakaien/archlinux-package-action@v2
|
||||
uses: heyhusen/archlinux-package-action@v2
|
||||
```
|
||||
|
||||
#### 2. Only generate .SRCINFO
|
||||
@@ -72,7 +74,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Validate package
|
||||
uses: hapakaien/archlinux-package-action@v2
|
||||
uses: heyhusen/archlinux-package-action@v2
|
||||
with:
|
||||
flags: ''
|
||||
namcap: false
|
||||
@@ -96,7 +98,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Validate package
|
||||
uses: hapakaien/archlinux-package-action@v2
|
||||
uses: heyhusen/archlinux-package-action@v2
|
||||
with:
|
||||
flags: ''
|
||||
namcap: false
|
||||
@@ -120,7 +122,7 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Validate package
|
||||
uses: hapakaien/archlinux-package-action@v2
|
||||
uses: heyhusen/archlinux-package-action@v2
|
||||
with:
|
||||
path: package
|
||||
flags: '-si --noconfirm'
|
||||
|
||||
+12
-2
@@ -1,7 +1,7 @@
|
||||
# https://help.github.com/en/articles/metadata-syntax-for-github-actions
|
||||
name: "Arch Linux's package action"
|
||||
description: "GitHub Action to run Arch Linux's package tools"
|
||||
author: 'hapakaien'
|
||||
author: 'heyhusen'
|
||||
branding:
|
||||
icon: 'package'
|
||||
color: 'blue'
|
||||
@@ -35,10 +35,18 @@ inputs:
|
||||
description: 'Validate package with namcap'
|
||||
default: 'true'
|
||||
required: false
|
||||
aur:
|
||||
description: 'Resolve dependencies using paru'
|
||||
default: 'false'
|
||||
required: false
|
||||
archlinux_keyring:
|
||||
description: 'Update archlinux-keyring'
|
||||
default: 'true'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'docker://ghcr.io/hapakaien/archlinux-package-action:1'
|
||||
image: Dockerfile
|
||||
args:
|
||||
- ${{ inputs.path }}
|
||||
- ${{ inputs.pkgver }}
|
||||
@@ -47,3 +55,5 @@ runs:
|
||||
- ${{ inputs.srcinfo }}
|
||||
- ${{ inputs.flags }}
|
||||
- ${{ inputs.namcap }}
|
||||
- ${{ inputs.aur }}
|
||||
- ${{ inputs.archlinux_keyring }}
|
||||
|
||||
+30
-4
@@ -2,17 +2,33 @@
|
||||
set -e
|
||||
|
||||
# Set path
|
||||
WORKPATH=$GITHUB_WORKSPACE/$INPUT_PATH
|
||||
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
|
||||
cd $HOME
|
||||
mkdir gh-action
|
||||
cd gh-action
|
||||
|
||||
# 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 ./
|
||||
sudo cp -fv "$WORKPATH"/PKGBUILD ./
|
||||
cp -fv "$GITHUB_WORKSPACE"/PKGBUILD ./
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
|
||||
# Update archlinux-keyring
|
||||
if [[ $INPUT_ARCHLINUX_KEYRING == true ]]; then
|
||||
echo "::group::Updating archlinux-keyring"
|
||||
sudo pacman -Syu --noconfirm archlinux-keyring
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
||||
# Update pkgver
|
||||
if [[ -n $INPUT_PKGVER ]]; then
|
||||
echo "::group::Updating pkgver on PKGBUILD"
|
||||
@@ -21,7 +37,7 @@ if [[ -n $INPUT_PKGVER ]]; then
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
||||
# Update pkgver
|
||||
# Update pkgrel
|
||||
if [[ -n $INPUT_PKGREL ]]; then
|
||||
echo "::group::Updating pkgrel on PKGBUILD"
|
||||
sed -i "s:^pkgrel=.*$:pkgrel=$INPUT_PKGREL:g" PKGBUILD
|
||||
@@ -52,6 +68,14 @@ if [[ $INPUT_NAMCAP == true ]]; then
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
||||
# Install depends using paru from aur
|
||||
if [[ $INPUT_AUR == true ]]; then
|
||||
echo "::group::Installing depends using paru"
|
||||
source PKGBUILD
|
||||
paru -Syu --removemake --needed --noconfirm "${depends[@]}" "${makedepends[@]}"
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
||||
# Run makepkg
|
||||
if [[ -n $INPUT_FLAGS ]]; then
|
||||
echo "::group::Running makepkg with flags"
|
||||
@@ -59,6 +83,8 @@ if [[ -n $INPUT_FLAGS ]]; then
|
||||
echo "::endgroup::"
|
||||
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"
|
||||
sudo cp -fv PKGBUILD "$WORKPATH"/PKGBUILD
|
||||
if [[ -e .SRCINFO ]]; then
|
||||
|
||||
Reference in New Issue
Block a user