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