Update manifest #30
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: Gentoo Desktop OpenRC AMD64 | |
| on: | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| gentoo-job: | |
| runs-on: ubuntu-latest # GitHub Actions host runner | |
| permissions: | |
| contents: write | |
| container: | |
| image: gentoo/stage3:desktop # Pulls the Gentoo image from Docker Hub | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Synchronise repo and install essentials | |
| run: | | |
| emerge --sync | |
| emerge dev-vcs/git flaggie app-eselect/eselect-repository openssh sudo app-crypt/gnupg | |
| - name: Recreate git repo structure | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git config --global --add safe.directory "$(realpath .)" | |
| git init | |
| git branch -m main | |
| git remote add origin https://x-access-token:${{ secrets.CODETRACER_PUSH_GITHUB_TOKEN }}@github.com/metacraft-labs/metacraft-overlay | |
| git fetch --all | |
| git reset --hard origin/main | |
| - name: Update manifests | |
| run: | | |
| useradd -K MAIL_DIR=/dev/null -m builder | |
| chown -R builder $(pwd) | |
| echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | |
| sudo -E -u builder env HOME=/home/builder git config --local user.name "github-actions[bot]" | |
| sudo -E -u builder env HOME=/home/builder git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| sudo -E -u builder env HOME=/home/builder git config --local init.defaultBranch main | |
| sudo -E -u builder git fetch --all | |
| old="$(pwd)" | |
| for manifest in $(find -iname "Manifest"); do | |
| man="$(realpath "${manifest}")" | |
| cd "$(dirname "${man}")" | |
| rm Manifest | |
| ebuild *.ebuild clean digest | |
| cd "${old}" | |
| done | |
| chown -R builder $(pwd) | |
| sudo -E -u builder git remote set-url origin https://x-access-token:${{ secrets.CODETRACER_PUSH_GITHUB_TOKEN }}@github.com/metacraft-labs/metacraft-overlay | |
| sudo -E -u builder sh -c "(git add . && git commit -m 'Update manifest' && git push origin HEAD:main) || echo 'Nothing to commit'" | |
| - name: Sync and add repo | |
| run: | | |
| eselect repository add metacraft-overlay git https://github.com/metacraft-labs/metacraft-overlay.git || exit | |
| emerge --sync metacraft-overlay || exit | |
| - name: Configure use flags | |
| run: | | |
| flaggie raft +lz4 | |
| flaggie xdelta +lzma | |
| flaggie squashfs-tools +lzma | |
| flaggie libcap +static-libs | |
| - name: Install applications | |
| run: | | |
| emerge codetracer-bin || exit |