# not enabling `errtrace` and `pipefail` since those are bash specific
set -o errexit # failing commands causes script to fail
-set -o nounset # undefined variables causes script to fail
+set -o nounset # undefined variables causes script to fail
+
+echo "src/gz packages_ci file:///ci" >> /etc/opkg/distfeeds.conf
+
+FINGERPRINT="$(usign -F -p /ci/packages_ci.pub)"
+cp /ci/packages_ci.pub "/etc/opkg/keys/$FINGERPRINT"
mkdir -p /var/lock/
[ -n "${CI_HELPER:=''}" ] || CI_HELPER="/ci/.github/workflows/ci_helpers.sh"
for PKG in /ci/*.ipk; do
- tar -xzOf "$PKG" ./control.tar.gz | tar xzf - ./control
+ tar -xzOf "$PKG" ./control.tar.gz | tar xzf - ./control
# package name including variant
PKG_NAME=$(sed -ne 's#^Package: \(.*\)$#\1#p' ./control)
# package version without release
echo "Building $PACKAGES"
echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV
+ - name: Generate build keys
+ run: |
+ sudo apt-get install -y signify-openbsd
+ signify-openbsd -G -n -c 'DO NOT USE - OpenWrt packages feed CI' -p packages_ci.pub -s packages_ci.sec
+ EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
+ echo "KEY_BUILD<<$EOF" >> $GITHUB_ENV
+ cat packages_ci.sec >> $GITHUB_ENV
+ echo "$EOF" >> $GITHUB_ENV
+
- name: Build
uses: openwrt/gh-action-sdk@v5
env:
ARCH: ${{ matrix.arch }}-${{ env.BRANCH }}
FEEDNAME: packages_ci
+ INDEX: 1
+ KEY_BUILD: ${{ env.KEY_BUILD }}
- name: Move created packages to project dir
- run: cp bin/packages/${{ matrix.arch }}/packages_ci/*.ipk . || true
+ run: cp bin/packages/${{ matrix.arch }}/packages_ci/* . || true
- name: Store packages
uses: actions/upload-artifact@v3
with:
- name: ${{ matrix.arch}}-packages
- path: "*.ipk"
+ name: ${{env.ARCHIVE_NAME}}-packages
+ path: |
+ Packages
+ Packages.*
+ *.ipk
+ PKG-INFO
- name: Store logs
uses: actions/upload-artifact@v3