Build Arch Repository #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build aarch64 repo packages | |
| on: | |
| workflow_dispatch: | |
| # schedule: | |
| # - cron: "0 0 * * *" | |
| # push: | |
| # branches: | |
| # - main | |
| # paths-ignore: | |
| # - "**/README.md" | |
| jobs: | |
| build-packages: | |
| runs-on: ubuntu-22.04-arm | |
| container: danhunsaker/archlinuxarm | |
| env: | |
| BUILD_ALARM_SH: 'sudo su - alarm -c' | |
| steps: | |
| - name: Install build dependencies | |
| run: | | |
| # Install makepkg deps | |
| uname -a | |
| pacman --noconfirm -Syu | |
| pacman --noconfirm -S sudo binutils fakeroot base-devel git rdfind | |
| - name: checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set variables | |
| run: | | |
| echo RELEASE=$(date +%Y\/%m\/%d) >> $GITHUB_ENV | |
| shell: bash | |
| - name: Setup builder | |
| run: | | |
| curl -L -o /etc/pacman.conf https://github.com/silime/ArchlinuxARM-qcom-aarch64/raw/main/pacman.conf | |
| pacman-key --init && pacman-key --populate archlinuxarm | |
| pacman-key --recv-keys F60FD4C6D426DAB6 | |
| pacman-key --lsign F60FD4C6D426DAB6 | |
| pacman -Syyu --noconfirm --ask=4 arch-install-scripts cloud-guest-utils sudo binutils fakeroot base-devel git | |
| useradd -m alarm | |
| passwd -d alarm | |
| usermod -aG wheel alarm | |
| echo 'alarm ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers | |
| cp ./* /home/alarm/ -r | |
| mkdir /packages | |
| chown alarm /home/alarm/* /packages | |
| shell: bash | |
| - name: Setup GPG | |
| run: | | |
| # Import the GPG private key | |
| echo 1 | |
| ${{ env.BUILD_ALARM_SH }} 'echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --import --passphrase "${{ secrets.GPG_PASSPHRASE }}" --pinentry-mode loopback' | |
| # Configure the GPG agent to use the passphrase | |
| echo 2 | |
| ${{ env.BUILD_ALARM_SH }} 'echo "default-cache-ttl 18000" > ~/.gnupg/gpg-agent.conf' | |
| echo 3 | |
| ${{ env.BUILD_ALARM_SH }} 'echo "max-cache-ttl 18000" >> ~/.gnupg/gpg-agent.conf' | |
| echo 4 | |
| ${{ env.BUILD_ALARM_SH }} 'gpgconf --reload gpg-agent' | |
| echo 5 | |
| - name: Build packages | |
| run: | | |
| ${{ env.BUILD_ALARM_SH }} 'git config --global user.email "chalkinbot@users.noreply.github.com"' | |
| ${{ env.BUILD_ALARM_SH }} 'git config --global user.name "chalkinbot"' | |
| ${{ env.BUILD_ALARM_SH }} 'ls -l' | |
| ${{ env.BUILD_ALARM_SH }} './build_repo.sh "${{ secrets.GPG_PASSPHRASE }}" qcom' | |
| ${{ env.BUILD_ALARM_SH }} 'ls -R' | |
| ${{ env.BUILD_ALARM_SH }} 'cp ./*/*.pkg.tar.zst /packages' | |
| - name: create artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: logs | |
| path: ./build/logs.tar # or path/to/artifact | |
| # - name: create release | |
| # uses: softprops/action-gh-release@v2 | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # with: | |
| # body: ${{ env.RELEASE }} | |
| # tag_name: ${{ env.RELEASE }} | |
| # draft: false | |
| # prerelease: false | |
| # files: | | |
| # ./build/repo/qcom/* | |
| # - name: delete old releases | |
| # uses: dev-drprasad/delete-older-releases@v0.3.4 | |
| # with: | |
| # keep_latest: 1 | |
| # delete_tags: true | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |