New package: grub2-theme-preview-2.8.0 #33
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: Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: 'ghcr.io/void-linux/xbps-src-masterdir:latest-${{ matrix.config.bootstrap }}' | |
env: | |
PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin' | |
ARCH: '${{ matrix.config.arch }}' | |
BOOTSTRAP: '${{ matrix.config.bootstrap }}' | |
# TEST: '${{ matrix.config.test }}' | |
HOSTREPO: /hostrepo | |
REPOSITORY: '${{ github.repository }}' | |
BRANCH: '${{ github.ref_name }}' | |
REF: '${{ github.ref }}' | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { arch: x86_64, bootstrap: x86_64, test: 1 } | |
# - { arch: i686, bootstrap: i686, test: 1 } | |
# - { arch: aarch64, bootstrap: x86_64, test: 0 } | |
# - { arch: armv7l, bootstrap: x86_64, test: 0 } | |
# - { arch: x86_64-musl, bootstrap: x86_64-musl, test: 1 } | |
# - { arch: armv6l-musl, bootstrap: x86_64-musl, test: 0 } | |
# - { arch: aarch64-musl, bootstrap: x86_64-musl, test: 0 } | |
steps: | |
- name: Prepare container | |
run: | | |
xbps-install -Syu || xbps-install -yu xbps | |
xbps-install -yu | |
xbps-install -y bash git libstdc++ tar wget ${{ env.ACT && 'nodejs' }} | |
echo "HOME=$HOME" >> $GITHUB_ENV | |
# Non x86_64: https://github.com/actions/checkout/issues/334 | |
- uses: actions/checkout@v3 | |
with: | |
repository: void-linux/void-packages | |
fetch-depth: 1 | |
- name: Create hostrepo and prepare masterdir | |
run: | | |
ln -s "$(pwd)" /hostrepo \ | |
&& common/travis/set_mirror.sh \ | |
&& common/travis/prepare.sh \ | |
&& git config --global --add safe.directory "$(pwd)" \ | |
&& common/travis/fetch-xtools.sh | |
echo; echo "===== Checking out xpackages repository =====" | |
wget "$GITHUB_SERVER_URL/$REPOSITORY/archive/$REF.tar.gz" | |
tar -xzvf "${BRANCH:-$(basename $REF)}.tar.gz" --strip-components=1 -C srcpkgs | |
echo; echo "===== Changed Templates =====" | |
git add . | |
git diff-index -r --no-renames --name-only --diff-filter=AM --cached HEAD \ | |
-- 'srcpkgs/*/template' \ | |
| cut -d/ -f 2 \ | |
| tee /tmp/templates \ | |
| sed "s/^/ /" >&2 | |
- name: Build (xbps-src) | |
run: | | |
here="$(pwd)" | |
cd / | |
echo; echo "===== Building Packages =====" | |
"$here/common/travis/build.sh" "$BOOTSTRAP" "$ARCH" "$TEST" | |
cd - | |
- name: Metadata and Verification (void-packages/scripts) | |
run: | | |
here="$(pwd)" | |
cd / | |
echo; echo "===== Displaying Files =====" | |
"$here/common/travis/show_files.sh" "$BOOTSTRAP" "$ARCH" | |
echo; echo "===== Displaying Diffs =====" | |
"$here/common/travis/xpkgdiff.sh" "$BOOTSTRAP" "$ARCH" | |
echo; echo "===== Checking installation =====" | |
"$here/common/travis/check-install.sh" "$BOOTSTRAP" "$ARCH" | |
cd - | |
- name: Sign repository | |
run: | | |
echo "${{ secrets.SIGNING_RSA_KEY }}" > private.pem | |
xbps-rindex --privkey private.pem --sign --signedby "Animesh Sahu" $HOME/hostdir/binpkgs | |
xbps-rindex --privkey private.pem --sign-pkg $HOME/hostdir/binpkgs/*.xbps | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: binpkg-${{ matrix.config.ARCH }} | |
path: ${{ env.HOME }}/hostdir/binpkgs | |
retention-days: 1 | |
post_build: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
- name: Flatten the artifacts hierarchy | |
run: | | |
rsync -avh --remove-source-files binpkg-*/ ./ | |
find ./ -type d -empty -delete | |
- name: Deploy Binaries | |
env: | |
NETLIFY_LFS: https://fbd39825-00be-4c1a-9eec-3e33af6cd078.netlify.app/.netlify/large-media | |
run: | | |
export SHELL=/bin/bash | |
sudo apt-get update -y && sudo apt-get install -y git git-lfs nodejs npm | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git init . -b binaries | |
git lfs install | |
git lfs track '*.xbps' | |
git config "lfs.$NETLIFY_LFS.locksverify" false | |
npm i -g netlify-cli | |
mkdir -p $HOME/.config/netlify | |
printf '%s\n' '[lfs]' " url = $NETLIFY_LFS" > .lfsconfig | |
printf '%s\n' '${{ secrets.NETLIFY_CONFIG }}' > $HOME/.config/netlify/config.json | |
netlify lm:install --force || true | |
source /home/runner/.config/netlify/helper/path.$(basename "$SHELL").inc | |
git add . | |
git commit --no-verify --signoff --author "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>" -m "Deploy XBPS Binaries" | |
git push -fu "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY" HEAD:binaries --atomic | |