BigLinux Update Key #135
This file contains 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: BigLinux Update Key | |
# Controls when the workflow will run | |
on: | |
schedule: | |
- cron: '0 23 * * 3' | |
push: | |
#branches: [ "master", "main", "*" ] | |
branches: [ "*" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- id: install-build-dependencies | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install \ | |
build-essential \ | |
cmake \ | |
git \ | |
libarchive-dev \ | |
libarchive-tools \ | |
libcurl4-openssl-dev \ | |
libgpgme-dev \ | |
libssl-dev \ | |
zip \ | |
python3-pip | |
sudo pip3 install meson | |
sudo pip3 install ninja | |
- name: install pacman | |
shell: bash | |
env: | |
PACMAN_VERSION: 6.0.1 | |
run: | | |
sudo git clone --depth 1 https://gitlab.manjaro.org/packages/core/pacman.git | |
pushd pacman | |
sudo wget https://sources.archlinux.org/other/pacman/pacman-${PACMAN_VERSION}.tar.xz | |
sudo tar -xvf pacman-${PACMAN_VERSION}.tar.xz | |
pushd pacman-${PACMAN_VERSION} | |
#sudo patch -p1 -i ../pacman-sync-first-option.patch | |
sudo meson --prefix=/usr \ | |
--buildtype=plain \ | |
-Ddoc=disabled \ | |
-Ddoxygen=enabled \ | |
-Dscriptlet-shell=/usr/bin/bash \ | |
-Dldconfig=/usr/bin/ldconfig \ | |
build | |
sudo meson compile -C build | |
sudo meson install -C build | |
popd | |
sudo install -m644 pacman.conf /etc/pacman.conf | |
sudo install -m644 makepkg.conf /etc/ | |
sudo mkdir -p /etc/pacman.d | |
sudo touch /etc/pacman.d/mirrorlist | |
popd | |
sudo rm -rf pacman | |
#add biglinux repository | |
sudo sed -i '/\[core\]/{h;s/.*/\[biglinux-update-stable\]/;p;x;}' /etc/pacman.conf | |
sudo sed -i '/\[core\]/{h;s/.*/SigLevel = PackageRequired/;p;x;}' /etc/pacman.conf | |
sudo sed -i '/\[core\]/{h;s/.*/Server = https:\/\/repo.biglinux.com.br\/update-stable\/$arch/;p;x;}' /etc/pacman.conf | |
sudo sed -i '/\[core\]/{h;s/.*//;p;x;}' /etc/pacman.conf | |
echo ' | |
[biglinux-testing] | |
SigLevel = PackageRequired | |
Server = https://repo.biglinux.com.br/testing/$arch' | sudo tee -a /etc/pacman.conf | |
echo ' | |
[biglinux-stable] | |
SigLevel = PackageRequired | |
Server = https://repo.biglinux.com.br/stable/$arch' | sudo tee -a /etc/pacman.conf | |
- name: install keyrings | |
shell: bash | |
run: | | |
sudo install -dm755 /usr/share/pacman/keyrings/ | |
sudo git clone --depth 1 https://gitlab.manjaro.org/packages/core/manjaro-keyring.git | |
pushd manjaro-keyring | |
sudo install -m0644 manjaro.gpg /usr/share/pacman/keyrings/ | |
sudo install -m0644 manjaro-trusted /usr/share/pacman/keyrings/ | |
sudo install -m0644 manjaro-trusted /usr/share/pacman/keyrings/ | |
popd | |
sudo rm -rf manjaro-keyring | |
mkdir -p archlinux-keyring | |
pushd archlinux-keyring | |
wget https://archlinux.org/packages/core/any/archlinux-keyring/download -O /tmp/archlinux-keyring.tar.zst | |
tar --use-compress-program=unzstd --strip-components=4 --wildcards -xvf /tmp/archlinux-keyring.tar.zst usr/share/pacman/keyrings/* | |
sudo install -m0644 archlinux.gpg /usr/share/pacman/keyrings/ | |
sudo install -m0644 archlinux-trusted /usr/share/pacman/keyrings/ | |
sudo install -m0644 archlinux-revoked /usr/share/pacman/keyrings/ | |
popd | |
sudo rm -rf archlinux-keyring | |
sudo git clone --depth 1 https://github.com/biglinux/biglinux-keyring.git | |
pushd biglinux-keyring | |
sudo install -m0644 biglinux.gpg /usr/share/pacman/keyrings/ | |
sudo install -m0644 biglinux-trusted /usr/share/pacman/keyrings/ | |
sudo install -m0644 biglinux-trusted /usr/share/pacman/keyrings/ | |
popd | |
sudo rm -rf biglinux-keyring | |
- name: Update Key | |
run: | | |
sudo pacman-key --init | |
sudo pacman-key --populate archlinux manjaro biglinux | |
cp -fa /etc/pacman.d/gnupg/pubring.gpg usr/share/pacman/keyrings/ | |
# cp -f /etc/pacman.d/gnupg/pubring.gpg etc/pacman.d/gnupg/ | |
cp -fa /etc/pacman.d/gnupg/trustdb.gpg usr/share/pacman/keyrings/ | |
# cp -f /etc/pacman.d/gnupg/trustdb.gpg etc/pacman.d/gnupg/ | |
- name: Update github | |
run: | | |
git add --all | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -m "Update $(date +%Y-%m-%d)" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
- name: Send Hooks BigLinux Build Package | |
shell: bash | |
run: | | |
curl -X POST -H "Accept: application/json" -H "Authorization: token ${{ secrets.WEBHOOK_TOKEN }}" --data '{"event_type": "${{ github.repository }}", "client_payload": { "branch": "${{ github.ref_name }}", "url": "https://github.com/${{ github.repository }}", "version": "1.2.3"}}' https://api.github.com/repos/BigLinux-Package-Build/build-package/dispatches |