This commit is contained in:
parent
a08868a2e5
commit
07c414dbfd
2 changed files with 68 additions and 6 deletions
|
@ -1,6 +1,15 @@
|
||||||
on:
|
on:
|
||||||
- workflow-dispatch
|
workflow-dispatch:
|
||||||
- push
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- "*.md"
|
||||||
|
- "**/*.md"
|
||||||
|
- ".gitlab-ci.yml"
|
||||||
|
- ".gitignore"
|
||||||
|
- "renovate.json"
|
||||||
|
- "debian/**"
|
||||||
|
- "docker/**"
|
||||||
|
- "docs/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -13,7 +22,15 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
apk update
|
apk update
|
||||||
apk upgrade
|
apk upgrade
|
||||||
apk add nodejs git alpine-sdk
|
apk add nodejs git alpine-sdk curl
|
||||||
|
|
||||||
|
- name: cache alpine repo
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
/var/cache/apk
|
||||||
|
key: alpine-cache
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
name: checkout the alpine dir
|
name: checkout the alpine dir
|
||||||
with:
|
with:
|
||||||
|
@ -35,6 +52,7 @@ jobs:
|
||||||
echo $HOME
|
echo $HOME
|
||||||
echo 'PACKAGER_PRIVKEY="/root/.abuild/ci@continuwuity.rsa"' > ~/.abuild/abuild.conf
|
echo 'PACKAGER_PRIVKEY="/root/.abuild/ci@continuwuity.rsa"' > ~/.abuild/abuild.conf
|
||||||
ls ~/.abuild
|
ls ~/.abuild
|
||||||
|
cp /root/.abuild/*.rsa.pub /etc/apk/keys
|
||||||
|
|
||||||
- name: go go gadget abuild
|
- name: go go gadget abuild
|
||||||
run: |
|
run: |
|
||||||
|
@ -42,8 +60,45 @@ jobs:
|
||||||
# modify the APKBUILD to use the current branch instead of the release
|
# modify the APKBUILD to use the current branch instead of the release
|
||||||
# note that it seems to require the repo to be public (as you'll get
|
# note that it seems to require the repo to be public (as you'll get
|
||||||
# a 404 even if the token is provided)
|
# a 404 even if the token is provided)
|
||||||
|
# export ARCHIVE_URL="https:${{ github.repository }}/archive/${{ github.ref_name }}.tar.gz"
|
||||||
export ARCHIVE_URL="${{ github.server_url }}/${{ github.repository }}/archive/${{ github.ref_name }}.tar.gz"
|
export ARCHIVE_URL="${{ github.server_url }}/${{ github.repository }}/archive/${{ github.ref_name }}.tar.gz"
|
||||||
echo $ARCHIVE_URL
|
export COMMIT_DATE=$(date -d @$(git show --no-patch --format=%ct HEAD) +%Y%m%d%H%M)
|
||||||
sed -i '/^source=/c\source="'"$ARCHIVE_URL" APKBUILD
|
echo $ARCHIVE_URL $COMMIT_DATE
|
||||||
|
|
||||||
|
# modify the APKBUILD to use the git archive tarball and version
|
||||||
|
#
|
||||||
|
sed -i '/^source=/c\source="'"$ARCHIVE_URL" APKBUILD
|
||||||
|
sed -i "/^pkgver=/s/$/_git${COMMIT_DATE}/" APKBUILD
|
||||||
|
env
|
||||||
abuild -F checksum
|
abuild -F checksum
|
||||||
abuild -Fr
|
abuild -FrK
|
||||||
|
|
||||||
|
# - name: Cache Rust registry
|
||||||
|
# uses: actions/cache@v3
|
||||||
|
# with:
|
||||||
|
# path: |
|
||||||
|
# .cargo/git
|
||||||
|
# .cargo/git/checkouts
|
||||||
|
# .cargo/registry
|
||||||
|
# .cargo/registry/src
|
||||||
|
# key: rust-registry-image-${{hashFiles('**/Cargo.lock') }}
|
||||||
|
# - name: Cache cargo target
|
||||||
|
# id: cache-cargo-target
|
||||||
|
# uses: actions/cache@v3
|
||||||
|
# with:
|
||||||
|
# path: |
|
||||||
|
# cargo-target-${{ matrix.slug }}
|
||||||
|
# key: cargo-target-${{ matrix.slug }}-${{hashFiles('**/Cargo.lock') }}-${{steps.rust-toolchain.outputs.rustc_version}}
|
||||||
|
|
||||||
|
|
||||||
|
- name: upload to registry
|
||||||
|
run: |
|
||||||
|
curl --header 'Authorization: token ${{ secrets.FORGEJO_TOKEN }}' \
|
||||||
|
--upload-file /root/packages/**/**/*.apk \
|
||||||
|
${{ env.GITHUB_API_URL }}/packages/${{ env.GITHUB_REPOSITORY_OWNER }}/alpine/edge/git
|
||||||
|
- name: 'debug state on failure (note: only for local testing)'
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
env | tee /tmp/env
|
||||||
|
sleep 1d || true
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,16 @@ source="https://forgejo.ellis.link/continuwuation/continuwuity/archive/v0.5.0-rc
|
||||||
continuwuity.initd
|
continuwuity.initd
|
||||||
continuwuity.confd
|
continuwuity.confd
|
||||||
"
|
"
|
||||||
|
_giturl="https://forgejo.ellis.link/continuwuation/continuwuity"
|
||||||
|
_gitbranch="main"
|
||||||
builddir="$srcdir/continuwuity"
|
builddir="$srcdir/continuwuity"
|
||||||
options="net !check"
|
options="net !check"
|
||||||
|
|
||||||
|
#snapshot() {
|
||||||
|
# # used for building from git
|
||||||
|
# git clone --depth=1 $_giturl -b $_gitbranch
|
||||||
|
#}
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
default_prepare
|
default_prepare
|
||||||
cd $srcdir/continuwuity
|
cd $srcdir/continuwuity
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue