Skip to content

Refresh Repository

Refresh Repository #10

name: "Refresh Repository"
on:
workflow_dispatch:
jobs:
refresh-repository:
name: Build and Upload Packages to Repository
runs-on: ubuntu-latest
container:
image: ghcr.io/void-linux/void-buildroot-${{ matrix.config.libc }}:20231230R1
options: --platform ${{ matrix.config.platform }}
env:
PATH: "/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin"
ARCH: "${{ matrix.config.arch }}"
BOOTSTRAP: "${{ matrix.config.host }}"
TEST: "${{ matrix.config.test }}"
HOSTREPO: /hostrepo
strategy:
fail-fast: false
matrix:
config:
- {
arch: x86_64,
host: x86_64,
libc: glibc,
platform: linux/amd64,
test: 1,
}
steps:
- name: Prepare container
run: |
mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
ls -la
sed -i 's|repo-default|repo-ci|g' /etc/xbps.d/*-repository-*.conf
xbps-install -Syu xbps
xbps-install -Syu
xbps-install -y tar curl unzip
#- name: Download artifact
#uses: actions/download-artifact@v4
#with:
#name: hyprland-void
#path: ./hyprland-void/
- name: Extract
run: |
mkdir hyprland-void
curl -L https://productionresultssa10.blob.core.windows.net/actions-results/7d43106e-3256-47db-9408-65c0c4571cc6/workflow-job-run-3969adc2-0854-59d3-df7e-cf8d4ea7dc93/artifacts/8fd872b8615941b6e2c03da187051790f300d4198cf9f1fd6fdc8ca534b559e3.zip?rscd=attachment%3B+filename%3D%22hyprland-void.zip%22&se=2024-06-12T02%3A16%3A25Z&sig=%2BHGxxcVbNZcBA2T3Qz7mE%2BB0hbGHGfLvc4Srfv%2FRaBs%3D&ske=2024-06-12T10%3A45%3A51Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2024-06-11T22%3A45%3A51Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2023-11-03&sp=r&spr=https&sr=b&st=2024-06-12T02%3A06%3A20Z&sv=2023-11-03 > ~/hyprland-void.zip
unzip -d ~/hyprland-void ~/hyprland-void.zip
mkdir ~/repository
tar -xvf ~/hyprland-void/hyprland.tar.gz -C ~/repository
- name: Retrieve private key
env:
PEM_TOKEN: ${{ secrets.PRIVATE_PEM_TOKEN }}
run: |
curl -L https://raw.githubusercontent.com/Makrennel/hyprland-void-private-pem/master/private.pem?token=$PEM_TOKEN > ./private.pem
- name: Sign repository
env:
PEM_PASSPHRASE: ${{ secrets.PRIVATE_PEM_PASSPHRASE }}
run: |
export XBPS_PASSPHRASE=${{ env.PEM_PASSPHRASE }}
xbps-rindex --privkey ./private.pem --sign --signedby "hyprland-void-github-action" ~/repository
xbps-rindex --privkey ./private.pem --sign-pkg ~/repository/*.xbps
- name: Checkout hyprland-void
uses: actions/checkout@v4
- name: Refresh repository
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git push origin -d repository
git switch --orphan repository
cp ~/repository/* ./
git add .
git commit -m "Upload latest packages to repository"
git push -u origin repository