Skip to content

Commit 3b2680f

Browse files
committed
fix: ci: build-packages aarch64
1 parent f7f51e4 commit 3b2680f

File tree

3 files changed

+259
-255
lines changed

3 files changed

+259
-255
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Build aarch64 repo packages
2+
3+
on:
4+
workflow_dispatch:
5+
# schedule:
6+
# - cron: "0 0 * * *"
7+
# push:
8+
# branches:
9+
# - main
10+
# paths-ignore:
11+
# - "**/README.md"
12+
13+
jobs:
14+
build-packages:
15+
runs-on: ubuntu-22.04-arm
16+
container: danhunsaker/archlinuxarm
17+
env:
18+
BUILD_ALARM_SH: 'sudo su - alarm -c'
19+
20+
steps:
21+
- name: Install build dependencies
22+
run: |
23+
# Install makepkg deps
24+
uname -a
25+
pacman --noconfirm -Syu
26+
pacman --noconfirm -S sudo binutils fakeroot base-devel git rdfind
27+
28+
- name: checkout repo
29+
uses: actions/checkout@v4
30+
31+
- name: Set variables
32+
run: |
33+
echo RELEASE=$(date +%Y\/%m\/%d) >> $GITHUB_ENV
34+
shell: bash
35+
36+
- name: Setup builder
37+
run: |
38+
curl -L -o /etc/pacman.conf https://github.com/silime/ArchlinuxARM-qcom-aarch64/raw/main/pacman.conf
39+
pacman-key --init && pacman-key --populate archlinuxarm
40+
pacman-key --recv-keys F60FD4C6D426DAB6
41+
pacman-key --lsign F60FD4C6D426DAB6
42+
pacman -Syyu --noconfirm --ask=4 arch-install-scripts cloud-guest-utils sudo binutils fakeroot base-devel git
43+
useradd -m alarm
44+
passwd -d alarm
45+
usermod -aG wheel alarm
46+
echo 'alarm ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
47+
cp ./* /home/alarm/ -r
48+
mkdir /packages
49+
chown alarm /home/alarm/* /packages
50+
shell: bash
51+
52+
- name: Setup GPG
53+
run: |
54+
# Import the GPG private key
55+
echo 1
56+
${{ env.BUILD_ALARM_SH }} 'echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --import --passphrase "${{ secrets.GPG_PASSPHRASE }}" --pinentry-mode loopback'
57+
# Configure the GPG agent to use the passphrase
58+
echo 2
59+
${{ env.BUILD_ALARM_SH }} 'echo "default-cache-ttl 18000" > ~/.gnupg/gpg-agent.conf'
60+
echo 3
61+
${{ env.BUILD_ALARM_SH }} 'echo "max-cache-ttl 18000" >> ~/.gnupg/gpg-agent.conf'
62+
echo 4
63+
${{ env.BUILD_ALARM_SH }} 'gpgconf --reload gpg-agent'
64+
echo 5
65+
- name: Build packages
66+
run: |
67+
${{ env.BUILD_ALARM_SH }} 'git config --global user.email "chalkinbot@users.noreply.github.com"'
68+
${{ env.BUILD_ALARM_SH }} 'git config --global user.name "chalkinbot"'
69+
${{ env.BUILD_ALARM_SH }} 'ls -l'
70+
${{ env.BUILD_ALARM_SH }} './build_repo.sh "${{ secrets.GPG_PASSPHRASE }}" qcom'
71+
${{ env.BUILD_ALARM_SH }} 'ls -R'
72+
${{ env.BUILD_ALARM_SH }} 'cp ./*/*.pkg.tar.zst /packages'
73+
74+
- name: create artifact
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: logs
78+
path: ./build/logs.tar # or path/to/artifact
79+
80+
# - name: create release
81+
# uses: softprops/action-gh-release@v2
82+
# env:
83+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84+
# with:
85+
# body: ${{ env.RELEASE }}
86+
# tag_name: ${{ env.RELEASE }}
87+
# draft: false
88+
# prerelease: false
89+
# files: |
90+
# ./build/repo/qcom/*
91+
92+
# - name: delete old releases
93+
# uses: dev-drprasad/delete-older-releases@v0.3.4
94+
# with:
95+
# keep_latest: 1
96+
# delete_tags: true
97+
# env:
98+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build-PKGBUILDs_aarch64.yml

Lines changed: 0 additions & 255 deletions
This file was deleted.

0 commit comments

Comments
 (0)