Fix apk-publish workflow: add nodejs dependency and use dynamic home path
This commit is contained in:
@@ -13,7 +13,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache git go abuild make
|
apk add --no-cache git go abuild make nodejs curl openssl
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -21,10 +21,11 @@ jobs:
|
|||||||
- name: Setup abuild for package signing
|
- name: Setup abuild for package signing
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.abuild
|
mkdir -p ~/.abuild
|
||||||
echo "PACKAGER_PRIVKEY=/home/runner/.abuild/private_key.rsa" > ~/.abuild/abuild.conf
|
echo "PACKAGER_PRIVKEY=$HOME/.abuild/private_key.rsa" > ~/.abuild/abuild.conf
|
||||||
echo "PACKAGER_PUBKEY=/home/runner/.abuild/private_key.rsa.pub" >> ~/.abuild/abuild.conf
|
echo "PACKAGER_PUBKEY=$HOME/.abuild/private_key.rsa.pub" >> ~/.abuild/abuild.conf
|
||||||
openssl genrsa -out ~/.abuild/private_key.rsa 2048
|
openssl genrsa -out ~/.abuild/private_key.rsa 2048
|
||||||
openssl rsa -pubout -in ~/.abuild/private_key.rsa -out ~/.abuild/private_key.rsa.pub
|
openssl rsa -pubout -in ~/.abuild/private_key.rsa -out ~/.abuild/private_key.rsa.pub
|
||||||
|
cp ~/.abuild/private_key.rsa.pub /etc/apk/keys/
|
||||||
abuild-keygen -a -n
|
abuild-keygen -a -n
|
||||||
|
|
||||||
- name: Prepare source
|
- name: Prepare source
|
||||||
@@ -47,12 +48,12 @@ jobs:
|
|||||||
- name: Find built package
|
- name: Find built package
|
||||||
id: find_package
|
id: find_package
|
||||||
run: |
|
run: |
|
||||||
find /home/runner/packages -name "*.apk" -type f > packages.txt
|
find "$HOME/packages" -name "*.apk" -type f > packages.txt
|
||||||
echo "package_path=$(head -1 packages.txt)" >> $GITHUB_OUTPUT
|
echo "package_path=$(head -1 packages.txt)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Publish to Gitea Registry
|
- name: Publish to Gitea Registry
|
||||||
run: |
|
run: |
|
||||||
apk_file=$(find /home/runner/packages -name "*.apk" -type f | head -1)
|
apk_file=$(find "$HOME/packages" -name "*.apk" -type f | head -1)
|
||||||
branch=$(echo "${{ github.ref_name }}" | sed 's/^v//')
|
branch=$(echo "${{ github.ref_name }}" | sed 's/^v//')
|
||||||
curl -X PUT \
|
curl -X PUT \
|
||||||
-H "Authorization: token ${{ secrets.ACCESS_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.ACCESS_TOKEN }}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user