feat: update pkgver
This commit is contained in:
@@ -25,11 +25,12 @@ jobs:
|
||||
cat action.yml
|
||||
|
||||
- name: Get sample PKGBUILD
|
||||
run: wget https://github.com/datakrama/nonicons-font/raw/main/PKGBUILD
|
||||
run: wget https://github.com/datakrama/plenti-bin/raw/f5ffaaee02a2119aa16f6b7a27e87e198e096b47/PKGBUILD
|
||||
|
||||
- name: Running test
|
||||
uses: ./
|
||||
with:
|
||||
pkgver: '0.4.26'
|
||||
updpkgsums: true
|
||||
srcinfo: true
|
||||
|
||||
@@ -93,7 +94,7 @@ jobs:
|
||||
uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: Get sample PKGBUILD
|
||||
run: wget https://github.com/datakrama/nonicons-font/raw/main/PKGBUILD
|
||||
run: wget https://github.com/datakrama/plenti-bin/raw/f5ffaaee02a2119aa16f6b7a27e87e198e096b47/PKGBUILD
|
||||
|
||||
- name: Update action.yml to use edge tagged container image
|
||||
if: github.ref == 'refs/heads/main'
|
||||
@@ -104,6 +105,7 @@ jobs:
|
||||
- name: Running test
|
||||
uses: ./
|
||||
with:
|
||||
pkgver: '0.4.26'
|
||||
updpkgsums: true
|
||||
srcinfo: true
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ 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 |
|
||||
| `updpkgsums` | Boolean | `false` | `false` | Update checksums on your PKGBUILD |
|
||||
| `srcinfo` | Boolean | `false` | `false` | Generate new .SRCINFO |
|
||||
| `namcap` | Boolean | `true` | `false` | Validate PKGBUILD |
|
||||
|
||||
@@ -11,6 +11,10 @@ inputs:
|
||||
description: 'Location for this action to run'
|
||||
default: ''
|
||||
required: false
|
||||
pkgver:
|
||||
description: 'Update pkgver on PKGBUILD'
|
||||
default: ''
|
||||
required: false
|
||||
updpkgsums:
|
||||
description: 'Update checksums on PKGBUILD'
|
||||
default: 'false'
|
||||
@@ -33,6 +37,7 @@ runs:
|
||||
image: 'docker://ghcr.io/datakrama/archlinux-package-action:1'
|
||||
args:
|
||||
- ${{ inputs.path }}
|
||||
- ${{ inputs.pkgver }}
|
||||
- ${{ inputs.updpkgsums }}
|
||||
- ${{ inputs.srcinfo }}
|
||||
- ${{ inputs.flags }}
|
||||
|
||||
@@ -11,6 +11,14 @@ sudo -u builder cp -fv "$WORKPATH"/PKGBUILD /tmp/gh-action/PKGBUILD
|
||||
cd /tmp/gh-action
|
||||
echo "::endgroup::"
|
||||
|
||||
# Update pkgver
|
||||
if [[ -n $INPUT_PKGVER ]]; then
|
||||
echo "::group::Updating pkgver on PKGBUILD"
|
||||
sed -i "s:^pkgver=.*$:pkgver=$INPUT_PKGVER:g" PKGBUILD
|
||||
git diff PKGBUILD
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
||||
# Update checksums
|
||||
if [[ $INPUT_UPDPKGSUMS == true ]]; then
|
||||
echo "::group::Updating checksums on PKGBUILD"
|
||||
|
||||
Reference in New Issue
Block a user